Compare commits
No commits in common. "0bf1f34bba18fe1801013c64417d382300849217" and "1b2e5f8fd19192c2b8ddcdf53d449fe6c9c4a6e7" have entirely different histories.
0bf1f34bba
...
1b2e5f8fd1
@ -127,6 +127,3 @@ func (b *BundleProvider) ListUnfinishedInfos(_ context.Context, req *bundle.Auto
|
||||
func (b *BundleProvider) SoftDeleteUnfinishedInfo(_ context.Context, req *bundle.SoftDeleteUnfinishedInfoRequest) (res *bundle.CommonResponse, err error) {
|
||||
return logic.SoftDeleteUnfinishedInfo(req)
|
||||
}
|
||||
func (b *BundleProvider) ReSignTheContract(_ context.Context, req *bundle.ReSignTheContractRequest) (res *bundle.CommonResponse, err error) {
|
||||
return logic.ReSignTheContract(req)
|
||||
}
|
||||
|
||||
@ -61,11 +61,6 @@ func (b *BundleProvider) ConfirmWork(_ context.Context, req *bundle.ConfirmWorkR
|
||||
return logic.ConfirmWork(req)
|
||||
}
|
||||
|
||||
// 获取待确认作品列表
|
||||
func (b *BundleProvider) GetWaitConfirmWorkList(_ context.Context, req *bundle.GetWaitConfirmWorkListReq) (*bundle.GetWaitConfirmWorkListResp, error) {
|
||||
return logic.GetWaitConfirmWorkList(req)
|
||||
}
|
||||
|
||||
// 套餐激活
|
||||
func (b *BundleProvider) BundleActivate(_ context.Context, req *bundle.BundleActivateReq) (*bundle.BundleActivateResp, error) {
|
||||
return nil, logic.BundleActivate(req)
|
||||
|
||||
@ -590,35 +590,3 @@ func (b *BundleProvider) AddHiddenTaskAssignee(_ context.Context, req *bundle.Ad
|
||||
}
|
||||
return &bundle.ComResponse{Msg: "删除该指派人成功"}, nil
|
||||
}
|
||||
|
||||
// CreateTaskWorkLog 创建任务日志记录
|
||||
func (b *BundleProvider) CreateTaskWorkLog(_ context.Context, req *bundle.CreateTaskWorkLogRequest) (*bundle.CommonResponse, error) {
|
||||
// 转换请求参数
|
||||
daoReq := &dao.CreateTaskWorkLogRequest{
|
||||
AssignRecordsUUID: req.AssignRecordsUUID,
|
||||
WorkUUID: req.WorkUUID,
|
||||
Title: req.Title,
|
||||
ArtistUUID: req.ArtistUUID,
|
||||
SubNum: req.SubNum,
|
||||
TelNum: req.TelNum,
|
||||
ArtistName: req.ArtistName,
|
||||
OperationType: int(req.OperationType),
|
||||
TaskType: int(req.TaskType),
|
||||
TaskCount: int(req.TaskCount),
|
||||
Remark: req.Remark,
|
||||
OperatorName: req.OperatorName,
|
||||
OperatorNum: req.OperatorNum,
|
||||
}
|
||||
|
||||
// 调用logic层
|
||||
err := logic.CreateTaskWorkLog(daoReq)
|
||||
if err != nil {
|
||||
return &bundle.CommonResponse{
|
||||
Msg: err.Error(),
|
||||
}, err
|
||||
}
|
||||
|
||||
return &bundle.CommonResponse{
|
||||
Msg: "任务日志创建成功",
|
||||
}, nil
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ package dao
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"micro-bundle/internal/model"
|
||||
"micro-bundle/pb/bundle"
|
||||
"micro-bundle/pkg/app"
|
||||
@ -502,26 +501,23 @@ func ToBeComfirmedWorks(req *bundle.ToBeComfirmedWorksReq) (data []model.CastWor
|
||||
unConfirmSubQuery := app.ModuleClients.BundleDB.
|
||||
Table("cast_work_log").
|
||||
Select("work_uuid, MAX(update_time) AS max_update_time").
|
||||
Where("cast_work_log.deleted_at = 0").
|
||||
Group("work_uuid").Where("work_status = ?", 4)
|
||||
|
||||
err = app.ModuleClients.BundleDB.
|
||||
Table("cast_work_log AS cwl").
|
||||
Joins("INNER JOIN (?) AS t ON cwl.work_uuid = t.work_uuid AND cwl.update_time = t.max_update_time", unConfirmSubQuery).
|
||||
Where("artist_uuid = ?", req.ArtistUuid).Where("cwl.deleted_at = 0").Where("confirmed_at = ?", 0).Count(&unconfirmed).Error
|
||||
Where("artist_uuid = ?", req.ArtistUuid).Where("confirmed_at = ?", 0).Count(&unconfirmed).Error
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
subQuery := app.ModuleClients.BundleDB.
|
||||
Table("cast_work_log").
|
||||
Select("work_uuid, MAX(update_time) AS max_update_time").
|
||||
Where("cast_work_log.deleted_at = 0").
|
||||
Group("work_uuid").Where("work_status in ?", []int{4, 5, 6, 7, 9})
|
||||
Group("work_uuid").Where("work_status in ?", []int{4, 5, 6, 7})
|
||||
session := app.ModuleClients.BundleDB.
|
||||
Table("cast_work_log AS cwl").
|
||||
Joins("INNER JOIN (?) AS t ON cwl.work_uuid = t.work_uuid AND cwl.update_time = t.max_update_time", subQuery).
|
||||
Where("artist_uuid = ?", req.ArtistUuid).
|
||||
Where("cwl.deleted_at = 0")
|
||||
Where("artist_uuid = ?", req.ArtistUuid)
|
||||
err = session.Count(&total).Error
|
||||
if err != nil {
|
||||
return
|
||||
@ -537,27 +533,6 @@ func ConfirmWork(req *bundle.ConfirmWorkReq) error {
|
||||
return app.ModuleClients.BundleDB.Model(&model.CastWorkLog{}).Where(&model.CastWorkLog{WorkUuid: req.WorkUuid}).Update("confirmed_at", time.Now().Unix()).Error
|
||||
}
|
||||
|
||||
func GetWaitConfirmWorkList() (data []model.CastWork, err error) {
|
||||
randomHours := rand.Intn(22) + 2 // 2-22小时
|
||||
now := time.Now()
|
||||
startTime := now.Add(-time.Duration(randomHours+2) * time.Hour).Format("2006-01-02 15:04:05")
|
||||
endTime := now.Add(-time.Duration(randomHours) * time.Hour).Format("2006-01-02 15:04:05")
|
||||
fmt.Println("检查开始时间:", startTime, "检查结束时间:", endTime)
|
||||
err = app.ModuleClients.BundleDB.Model(&model.CastWork{}).
|
||||
Joins("left join cast_work_log cwl on cwl.work_uuid = cast_work.uuid and cwl.work_status = 4 and cwl.deleted_at = 0").
|
||||
Where("cast_work.deleted_at = 0").
|
||||
Where("cast_work.status = ?", 4).
|
||||
Where("cwl.update_time > ?", startTime).
|
||||
Where("cwl.update_time < ?", endTime).
|
||||
Order("cast_work.submit_time asc").
|
||||
Limit(5).
|
||||
Find(&data).Error
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func BundleActivate(ids []uint32) error {
|
||||
for _, v := range ids {
|
||||
app.ModuleClients.BundleDB.Transaction(func(tx *gorm.DB) error {
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"micro-bundle/internal/model"
|
||||
"micro-bundle/pb/bundle"
|
||||
@ -191,7 +190,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cwe.cost_type = 1").
|
||||
Where("cwl.update_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cwl.update_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0 and ccl.deleted_at = 0 and cwe.deleted_at = 0")
|
||||
if req.BundleUuid != "" {
|
||||
query = query.Where("ccl.bundle_uuid = ?", req.BundleUuid)
|
||||
@ -210,7 +208,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cwe.cost_type != 1").
|
||||
Where("cwl.update_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cwl.update_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0 and ccl.deleted_at = 0 and cwe.deleted_at = 0")
|
||||
if req.BundleUuid != "" {
|
||||
query = query.Where("ccl.bundle_uuid = ?", req.BundleUuid)
|
||||
@ -242,7 +239,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cw.status in ?", []int{7, 6, 9}).
|
||||
Where("cwl.update_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cwl.update_time <= ?", req.End+" 23:59:59").
|
||||
Where("cw.origin_uuid = ''").
|
||||
Where("cw.deleted_at = 0 and cwl.deleted_at = 0 and cwe.deleted_at = 0").
|
||||
Group("cw.artist_uuid")
|
||||
|
||||
@ -305,7 +301,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cast_work.work_category = 2").
|
||||
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0")
|
||||
|
||||
if req.BundleUuid != "" {
|
||||
@ -326,7 +321,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cast_work.work_category = 2").
|
||||
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0 and bor.deleted_at IS NULL and bb.deleted_at IS NULL").
|
||||
Where("bor.bundle_uuid = ?", req.BundleUuid)
|
||||
err = query.Count(&newVideoUsed).Error
|
||||
@ -342,7 +336,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.work_category = 2"). // 视频类型
|
||||
Where("cwe.cost_type = 1"). // 套餐类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0")
|
||||
if req.BundleUuid != "" {
|
||||
queryBundleVideo = queryBundleVideo.Where("ccl.bundle_uuid = ?", req.BundleUuid)
|
||||
@ -359,7 +352,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.work_category = 2"). // 视频类型
|
||||
Where("cwe.cost_type in ?", []int{2, 3}). // 增值类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0")
|
||||
if req.BundleUuid != "" {
|
||||
queryIncreaseVideo = queryIncreaseVideo.Where("ccl.bundle_uuid = ?", req.BundleUuid)
|
||||
@ -443,7 +435,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cast_work.work_category = 1").
|
||||
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0")
|
||||
|
||||
if req.BundleUuid != "" {
|
||||
@ -463,7 +454,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cast_work.work_category = 1").
|
||||
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0 and bor.deleted_at IS NULL and bb.deleted_at IS NULL").
|
||||
Where("bor.bundle_uuid = ?", req.BundleUuid)
|
||||
err = query.Count(&newImageUsed).Error
|
||||
@ -479,7 +469,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.work_category = 1"). // 图文类型
|
||||
Where("cwe.cost_type = 1 "). // 套餐类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0")
|
||||
if req.BundleUuid != "" {
|
||||
queryBundleImage = queryBundleImage.Where("ccl.bundle_uuid = ?", req.BundleUuid)
|
||||
@ -496,7 +485,6 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.work_category = 1"). // 图文类型
|
||||
Where("cwe.cost_type in ?", []int{2, 3}). // 增值类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0")
|
||||
if req.BundleUuid != "" {
|
||||
queryIncreaseImage = queryIncreaseImage.Where("ccl.bundle_uuid = ?", req.BundleUuid)
|
||||
@ -513,15 +501,16 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
UnUsedDataAnalysis int64 `gorm:"column:un_used_data_analysis"`
|
||||
}
|
||||
var dataAnalysisCountInfo DataAnalysisCountResult
|
||||
query = app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa").
|
||||
query = app.ModuleClients.BundleDB.Model(&model.CastWork{}).
|
||||
Select(`
|
||||
SUM(CASE WHEN ccal.uuid IS NOT NULL AND ccal.deleted_at = 0 THEN 1 ELSE 0 END) AS data_analysis_used,
|
||||
SUM(CASE WHEN ccal.uuid IS NULL THEN 1 ELSE 0 END) AS un_used_data_analysis
|
||||
SUM(CASE WHEN ccl.uuid IS NOT NULL AND ccl.deleted_at = 0 THEN 1 ELSE 0 END) AS data_analysis_used,
|
||||
SUM(CASE WHEN ccl.uuid IS NULL THEN 1 ELSE 0 END) AS un_used_data_analysis
|
||||
`).
|
||||
Joins("left join cast_cost_analysis_log ccal on ccal.analysis_uuid = cwa.uuid").
|
||||
Where("cwa.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cwa.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cwa.deleted_at = 0")
|
||||
Joins("left join cast_cost_log ccl on ccl.work_uuid = cast_work.uuid").
|
||||
Where("cast_work.work_category = 3").
|
||||
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.deleted_at = 0")
|
||||
if req.BundleUuid != "" {
|
||||
query = query.Where("ccl.bundle_uuid = ?", req.BundleUuid)
|
||||
}
|
||||
@ -533,43 +522,46 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
||||
if req.BundleUuid == "" {
|
||||
newDataAnalysisUsed = dataAnalysisCountInfo.DataAnalysisUsed + dataAnalysisCountInfo.UnUsedDataAnalysis
|
||||
} else {
|
||||
query = app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa").
|
||||
Joins("left join bundle_balance bb ON CAST(bb.user_id AS CHAR) COLLATE utf8mb4_general_ci = cwa.artist_id COLLATE utf8mb4_general_ci AND cwa.submit_time >= bb.start_at AND cwa.submit_time <= bb.expired_at and bb.month = DATE_FORMAT(cwa.submit_time, '%Y-%m')").
|
||||
query = app.ModuleClients.BundleDB.Model(&model.CastWork{}).
|
||||
Joins("left join bundle_balance bb ON CAST(bb.user_id AS CHAR) COLLATE utf8mb4_general_ci = cast_work.artist_uuid COLLATE utf8mb4_general_ci AND cast_work.submit_time >= bb.start_at AND cast_work.submit_time <= bb.expired_at and bb.month = DATE_FORMAT(cast_work.submit_time, '%Y-%m')").
|
||||
Joins("left join bundle_order_records bor ON bor.uuid = bb.order_uuid").
|
||||
Where("cwa.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cwa.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cwa.deleted_at = 0 and bor.deleted_at IS NULL and bb.deleted_at IS NULL").
|
||||
Where("cast_work.work_category = 3").
|
||||
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.deleted_at = 0 and bor.deleted_at IS NULL and bb.deleted_at IS NULL").
|
||||
Where("bor.bundle_uuid = ?", req.BundleUuid)
|
||||
err = query.Count(&newDataAnalysisUsed).Error
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
//数据分析套餐总已上传数
|
||||
|
||||
var totalUploadedBundleDataAnalysisCount int64
|
||||
queryBundleDataAnalysis := app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa").
|
||||
Joins("left join cast_work_analysis_extra cwae on cwae.analysis_uuid = cwa.uuid AND cwae.deleted_at = 0").
|
||||
Joins("left join cast_cost_analysis_log ccal on ccal.analysis_uuid = cwa.uuid AND ccal.deleted_at = 0").
|
||||
Where("cwa.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cwae.cost_type = 1"). // 套餐类型
|
||||
Where("cwa.deleted_at = 0")
|
||||
queryBundleDataAnalysis := app.ModuleClients.BundleDB.Model(&model.CastWork{}).
|
||||
Joins("left join cast_work_extra cwe on cwe.work_uuid = cast_work.uuid").
|
||||
Joins("left join cast_cost_log ccl on ccl.work_uuid = cast_work.uuid AND ccl.deleted_at = 0").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.work_category = 3"). // 数据分析类型
|
||||
Where("cwe.cost_type = 1"). // 套餐类型
|
||||
Where("cast_work.deleted_at = 0")
|
||||
if req.BundleUuid != "" {
|
||||
queryBundleDataAnalysis = queryBundleDataAnalysis.Where("ccal.bundle_uuid = ?", req.BundleUuid)
|
||||
queryBundleDataAnalysis = queryBundleDataAnalysis.Where("ccl.bundle_uuid = ?", req.BundleUuid)
|
||||
}
|
||||
err = queryBundleDataAnalysis.Count(&totalUploadedBundleDataAnalysisCount).Error
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
//数据分析增值总已上传数
|
||||
|
||||
var totalUploadedIncreaseDataAnalysisCount int64
|
||||
queryIncreaseDataAnalysis := app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa").
|
||||
Joins("left join cast_work_analysis_extra cwae on cwae.analysis_uuid = cwa.uuid AND cwae.deleted_at = 0").
|
||||
Joins("left join cast_cost_analysis_log ccal on ccal.analysis_uuid = cwa.uuid AND ccal.deleted_at = 0").
|
||||
Where("cwa.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cwae.cost_type in ?", []int{2, 3}). // 增值类型
|
||||
Where("cwa.deleted_at = 0")
|
||||
queryIncreaseDataAnalysis := app.ModuleClients.BundleDB.Model(&model.CastWork{}).
|
||||
Joins("left join cast_work_extra cwe on cwe.work_uuid = cast_work.uuid AND cwe.deleted_at = 0").
|
||||
Joins("left join cast_cost_log ccl on ccl.work_uuid = cast_work.uuid AND ccl.deleted_at = 0").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cast_work.work_category = 3"). // 数据分析类型
|
||||
Where("cwe.cost_type in ?", []int{2, 3}). // 增值类型
|
||||
Where("cast_work.deleted_at = 0")
|
||||
if req.BundleUuid != "" {
|
||||
queryIncreaseDataAnalysis = queryIncreaseDataAnalysis.Where("ccal.bundle_uuid = ?", req.BundleUuid)
|
||||
queryIncreaseDataAnalysis = queryIncreaseDataAnalysis.Where("ccl.bundle_uuid = ?", req.BundleUuid)
|
||||
}
|
||||
err = queryIncreaseDataAnalysis.Count(&totalUploadedIncreaseDataAnalysisCount).Error
|
||||
if err != nil {
|
||||
@ -652,7 +644,6 @@ func MetricsOperatingCreate(req *bundle.MetricsOperatingCreateReq) (result *bund
|
||||
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 2"). // 视频类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
// Where("cwe.cost_type = 1"). // 套餐类型
|
||||
Where("deleted_at = 0").
|
||||
Count(&newUploadedBundleVideoCount)
|
||||
@ -673,7 +664,6 @@ func MetricsOperatingCreate(req *bundle.MetricsOperatingCreateReq) (result *bund
|
||||
// Joins("left join cast_work_extra cwe on cwe.work_uuid = cast_work.uuid").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 2"). // 视频类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
// Where("cwe.cost_type = 1"). // 套餐类型
|
||||
Where("deleted_at = 0").
|
||||
Count(&totalUploadedVideoCount)
|
||||
@ -685,7 +675,6 @@ func MetricsOperatingCreate(req *bundle.MetricsOperatingCreateReq) (result *bund
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 2"). // 视频类型
|
||||
Where("cwe.cost_type = 1"). // 套餐类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0 and cwe.deleted_at = 0").
|
||||
Count(&totalUploadedBundleVideoCount)
|
||||
|
||||
@ -695,7 +684,6 @@ func MetricsOperatingCreate(req *bundle.MetricsOperatingCreateReq) (result *bund
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 2"). // 视频类型
|
||||
Where("cwe.cost_type in ?", []int{2, 3}). // 增值类型或扩展类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0 and cwe.deleted_at = 0").
|
||||
Count(&totalUploadedIncreaseVideoCount)
|
||||
|
||||
@ -722,7 +710,6 @@ func MetricsOperatingCreate(req *bundle.MetricsOperatingCreateReq) (result *bund
|
||||
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 1"). // 图文类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
// Where("cwe.cost_type = 1"). // 套餐类型
|
||||
Where("deleted_at = 0").
|
||||
Count(&newUploadedBundleImageCount)
|
||||
@ -743,7 +730,6 @@ func MetricsOperatingCreate(req *bundle.MetricsOperatingCreateReq) (result *bund
|
||||
// Joins("left join cast_work_extra cwe on cwe.work_uuid = cast_work.uuid").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 1"). // 图文类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
// Where("cwe.cost_type = 2"). // 套餐类型
|
||||
Where("deleted_at = 0").
|
||||
Count(&totalUploadedImageCount)
|
||||
@ -755,7 +741,6 @@ func MetricsOperatingCreate(req *bundle.MetricsOperatingCreateReq) (result *bund
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 1"). // 图文类型
|
||||
Where("cwe.cost_type = 1"). // 套餐类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0 and cwe.deleted_at = 0").
|
||||
Count(&totalUploadedBundleImageCount)
|
||||
|
||||
@ -765,40 +750,43 @@ func MetricsOperatingCreate(req *bundle.MetricsOperatingCreateReq) (result *bund
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 1"). // 图文类型
|
||||
Where("cwe.cost_type in ?", []int{2, 3}). // 增值类型
|
||||
Where("cast_work.origin_uuid = ''").
|
||||
Where("cast_work.deleted_at = 0 and cwe.deleted_at = 0").
|
||||
Count(&totalUploadedIncreaseImageCount)
|
||||
|
||||
//====================数据分析=======================
|
||||
var newUploadedBundleDataAnalysisCount int64
|
||||
app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa").
|
||||
Where("cwa.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cwa.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cwa.deleted_at = 0").
|
||||
app.ModuleClients.BundleDB.Model(&model.CastWork{}).
|
||||
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 3"). // 数据分析类型
|
||||
Where("deleted_at = 0").
|
||||
Count(&newUploadedBundleDataAnalysisCount)
|
||||
result.NewUploadedBundleDataAnalysisCount = newUploadedBundleDataAnalysisCount
|
||||
|
||||
var totalUploadedDataAnalysisCount int64
|
||||
app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa").
|
||||
Where("cwa.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cwa.deleted_at = 0").
|
||||
app.ModuleClients.BundleDB.Model(&model.CastWork{}).
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 3"). // 数据分析类型
|
||||
Where("deleted_at = 0").
|
||||
Count(&totalUploadedDataAnalysisCount)
|
||||
result.TotalUploadedBundleDataAnalysisCount = totalUploadedDataAnalysisCount
|
||||
|
||||
var totalUploadedBundleDataAnalysisCount int64
|
||||
app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa").
|
||||
Joins("left join cast_work_analysis_extra cwae on cwae.analysis_uuid = cwa.uuid AND cwae.deleted_at = 0").
|
||||
Where("cwa.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cwae.cost_type = 1"). // 套餐类型
|
||||
Where("cwa.deleted_at = 0 and cwae.deleted_at = 0").
|
||||
app.ModuleClients.BundleDB.Model(&model.CastWork{}).
|
||||
Joins("left join cast_work_extra cwe on cwe.work_uuid = cast_work.uuid").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 3"). // 数据分析类型
|
||||
Where("cwe.cost_type = 1"). // 套餐类型
|
||||
Where("cast_work.deleted_at = 0 and cwe.deleted_at = 0").
|
||||
Count(&totalUploadedBundleDataAnalysisCount)
|
||||
|
||||
var totalUploadedIncreaseDataAnalysisCount int64
|
||||
app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa").
|
||||
Joins("left join cast_work_analysis_extra cwae on cwae.analysis_uuid = cwa.uuid AND cwae.deleted_at = 0").
|
||||
Where("cwa.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("cwae.cost_type in ?", []int{2, 3}). // 增值类型
|
||||
Where("cwa.deleted_at = 0 and cwe.deleted_at = 0").
|
||||
app.ModuleClients.BundleDB.Model(&model.CastWork{}).
|
||||
Joins("left join cast_work_extra cwe on cwe.work_uuid = cast_work.uuid AND cwe.deleted_at = 0").
|
||||
Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
|
||||
Where("work_category = 3"). // 数据分析类型
|
||||
Where("cwe.cost_type in ?", []int{2, 3}). // 增值类型
|
||||
Where("cast_work.deleted_at = 0 and cwe.deleted_at = 0").
|
||||
Count(&totalUploadedIncreaseDataAnalysisCount)
|
||||
|
||||
endMonth := timeParse(req.End + " 23:59:59").Format("2006-01")
|
||||
@ -1159,7 +1147,7 @@ func MetricsOperatingStatus(req *bundle.MetricsOperatingStatusReq) (data *bundle
|
||||
app.ModuleClients.BundleDB.Model(model.CastWork{}).
|
||||
Joins("left join cast_work_log cwl on cwl.work_uuid = cast_work.uuid").
|
||||
Joins("left join cast_cost_log ccl on ccl.work_uuid = cast_work.uuid").
|
||||
Where("cast_work.status = 9 and cwl.work_category = 2 and cwl.work_status = 9 and ccl.operator_name != '系统自动确定'").
|
||||
Where("cast_work.status = 9 and cwl.work_category = 2 and cwl.work_status = 9 and ccl.operator_name != '系统自动确定' and ccl.operator_id != ? ", "0").
|
||||
Where("cast_work.submit_time <= ?", req.Date+" 23:59:59").
|
||||
Where("cwl.deleted_at = 0 and ccl.deleted_at = 0 and cast_work.deleted_at = 0").
|
||||
Count(&data.ArtistConfirmVideoCount)
|
||||
@ -1184,7 +1172,7 @@ func MetricsOperatingStatus(req *bundle.MetricsOperatingStatusReq) (data *bundle
|
||||
app.ModuleClients.BundleDB.Model(model.CastWork{}).
|
||||
Joins("left join cast_work_log cwl on cwl.work_uuid = cast_work.uuid").
|
||||
Joins("left join cast_cost_log ccl on ccl.work_uuid = cast_work.uuid").
|
||||
Where("cast_work.status = 9 and cwl.work_category = 1 and cwl.work_status = 9 and ccl.operator_name != '系统自动确定'").
|
||||
Where("cast_work.status = 9 and cwl.work_category = 1 and cwl.work_status = 9 and ccl.operator_name != '系统自动确定' and ccl.operator_id != ?", "0").
|
||||
Where("cast_work.submit_time <= ?", req.Date+" 23:59:59").
|
||||
Where("cwl.deleted_at = 0 and ccl.deleted_at = 0 and cast_work.deleted_at = 0").
|
||||
Count(&data.ArtistConfirmImageCount)
|
||||
@ -1195,87 +1183,60 @@ func MetricsOperatingStatus(req *bundle.MetricsOperatingStatusReq) (data *bundle
|
||||
Where("cast_work.submit_time <= ?", req.Date+" 23:59:59").
|
||||
Where("cwl.deleted_at = 0 and ccl.deleted_at = 0 and cast_work.deleted_at = 0").
|
||||
Count(&data.AutoConfirmImageCount)
|
||||
//======================数据分析======================
|
||||
var analysisStatistic = func(status int8) (i int64) {
|
||||
app.ModuleClients.BundleDB.Table("cast_work_analysis").Where("work_analysis_status = ?", status).Where("deleted_at = 0 and submit_time <= ?", req.Date+" 23:59:59").Count(&i)
|
||||
return
|
||||
}
|
||||
data.ReviewingDataAnalysisCount = analysisStatistic(2)
|
||||
data.RejectDataAnalysisCount = analysisStatistic(3)
|
||||
data.WaitConfirmDataAnalysisCount = analysisStatistic(4)
|
||||
data.PendingUploadDataAnalysisCount = analysisStatistic(6)
|
||||
data.UploadSuccessDataAnalysisCount = analysisStatistic(7)
|
||||
data.UploadFailedDataAnalysisCount = analysisStatistic(5)
|
||||
|
||||
app.ModuleClients.BundleDB.Table("cast_work_analysis").
|
||||
Joins("left join cast_cost_analysis_log ccal on ccal.analysis_uuid = cast_work_analysis.uuid AND ccal.deleted_at = 0").
|
||||
Where("cast_work_analysis.work_analysis_status in ?", []int{6, 7}).
|
||||
Where("cast_work_analysis.deleted_at = 0").
|
||||
Where("ccal.operator_name != '系统自动确定'").
|
||||
Where("cast_work_analysis.submit_time <= ?", req.Date+" 23:59:59").
|
||||
Count(&data.ArtistConfirmDataAnalysisCount)
|
||||
app.ModuleClients.BundleDB.Table("cast_work_analysis").
|
||||
Joins("left join cast_cost_analysis_log ccal on ccal.analysis_uuid = cast_work_analysis.uuid AND ccal.deleted_at = 0").
|
||||
Where("cast_work_analysis.work_analysis_status in ?", []int{6, 7}).
|
||||
Where("cast_work_analysis.deleted_at = 0").
|
||||
Where("ccal.operator_name = '系统自动确定'").
|
||||
Where("cast_work_analysis.submit_time <= ?", req.Date+" 23:59:59").
|
||||
Count(&data.AutoConfirmDataAnalysisCount)
|
||||
|
||||
//======================数据分析暂时未做======================
|
||||
return
|
||||
}
|
||||
|
||||
func MetricsBundlePurchaseExport(req *bundle.MetricsBundlePurchaseExportReq) (*bundle.MetricsBundlePurchaseExportResp, error) {
|
||||
result := &bundle.MetricsBundlePurchaseExportResp{}
|
||||
var purchaseItems []model.PurchaseItem
|
||||
sql := fmt.Sprintf(`select
|
||||
t1.order_no as orderNo,
|
||||
t1.bundle_name as bundleName,
|
||||
t2.sub_num as userNum,
|
||||
t3.name as userName,
|
||||
t2.tel_num as phoneNumber,
|
||||
t1.pay_time as payTime,
|
||||
case when t1.pay_time < '2025-06-18 22:37:56' then t1.num
|
||||
else
|
||||
case when t1.total_amount = 3150 THEN 3
|
||||
WHEN t1.total_amount = 4200 THEN 5
|
||||
WHEN t1.total_amount = 5600 THEN 8
|
||||
WHEN t1.total_amount = 6500 THEN 10
|
||||
WHEN t1.total_amount = 8500 THEN 15
|
||||
WHEN t1.total_amount = 10500 THEN 20
|
||||
WHEN t1.total_amount = 11500 THEN 25
|
||||
WHEN t1.total_amount = 14100 THEN 30
|
||||
WHEN t1.total_amount = 16200 THEN 35
|
||||
WHEN t1.total_amount = 18300 THEN 40
|
||||
WHEN t1.total_amount> 18300 THEN (t1.total_amount-1500)/420
|
||||
else 0
|
||||
end
|
||||
end as increaseVideoCount,
|
||||
t1.amount as bundleAmount,
|
||||
case when t1.pay_time < '2025-06-18 22:37:56' then t1.value_add_bundle_amount
|
||||
else t1.total_amount - t1.amount
|
||||
end as increaseAmount,
|
||||
t1.total_amount as paymentAmount,
|
||||
case when t3.name = '徐子清' then 1325.45
|
||||
else CAST(t1.total_amount AS DECIMAL(18,2)) - CAST(t4.sum_fee AS DECIMAL(18,2))
|
||||
end as finalAmount,
|
||||
case when t3.name = '徐子清' then 25.77
|
||||
else CAST(t4.sum_fee AS DECIMAL(18,2))
|
||||
end as feeAmount
|
||||
from bundle_order_records t1
|
||||
left join %s t2 on t1.customer_id = t2.id
|
||||
left join %s t3 on t2.real_name_id = t3.id
|
||||
left join
|
||||
(
|
||||
select a1.order_no, sum(a2.handling_fee) as sum_fee from bundle_order_records a1
|
||||
left join reconciliation a2 on a1.order_no = a2.bundle_order_on
|
||||
where a1.deleted_at is null and a1.status = 2 and a1.total_amount > 300 and a2.deleted_at is null
|
||||
group by a1.order_no
|
||||
) t4 on t1.order_no = t4.order_no
|
||||
where t1.deleted_at is null and t1.status = 2 and t1.total_amount > 300
|
||||
order by t2.sub_num asc`,
|
||||
"`micro-account`.`user`",
|
||||
"`micro-account`.`real_name`")
|
||||
sql := `select
|
||||
order_no,
|
||||
bundle_name,
|
||||
customer_num as user_num,
|
||||
customer_name as user_name,
|
||||
u.tel_num as phone_number,
|
||||
bor.pay_time,
|
||||
bbs.bundle_video as bundle_video_count,
|
||||
bor.amount as bundle_amount,
|
||||
bbs.increate_video as increase_video_count,
|
||||
(bor.total_amount-bor.amount) as increase_amount,
|
||||
total_amount as payment_amount,
|
||||
fee.handling_fee as fee_amount
|
||||
from
|
||||
bundle_order_records bor
|
||||
left join (
|
||||
select
|
||||
(bundle_video_number + bundle_limit_video_number + bundle_limit_video_expired_number ) as bundle_video,
|
||||
(increase_video_number + increase_limit_video_number + increase_limit_video_expired_number) as increate_video,
|
||||
order_uuid
|
||||
from
|
||||
bundle_balance bb
|
||||
left join (
|
||||
select
|
||||
min(month) as min_month ,
|
||||
bb2.order_uuid as min_order_uuid
|
||||
from
|
||||
bundle_balance bb2
|
||||
group by
|
||||
bb2.order_uuid
|
||||
) bb2 on
|
||||
bb2.min_order_uuid = bb.order_uuid
|
||||
where
|
||||
bb.month = bb2.min_month
|
||||
and
|
||||
bb.deleted_at is null
|
||||
and bb.deleted_at is null
|
||||
) bbs on
|
||||
bbs.order_uuid = bor.uuid
|
||||
left join` + " `micro-account`.`user`" + ` u on
|
||||
u.id = bor.customer_id
|
||||
left join(
|
||||
select sum(r.handling_fee) as handling_fee, r.bundle_order_on from reconciliation r where r.deleted_at is null group by r.bundle_order_on
|
||||
) fee on
|
||||
fee.bundle_order_on = bor.order_no
|
||||
where
|
||||
bor.deleted_at is null and bor.status = 2
|
||||
`
|
||||
if req.Month != "" {
|
||||
t, err := time.Parse("2006-01", req.Month)
|
||||
if err != nil {
|
||||
@ -1283,31 +1244,13 @@ func MetricsBundlePurchaseExport(req *bundle.MetricsBundlePurchaseExportReq) (*b
|
||||
}
|
||||
start := datetime.BeginOfMonth(t)
|
||||
end := datetime.EndOfMonth(t)
|
||||
sql += fmt.Sprintf("and t1.pay_time >= '%s' and t1.pay_time <= '%s'", start.Format(time.DateTime), end.Format(time.DateTime))
|
||||
sql += fmt.Sprintf("and bor.pay_time >= '%s' and bor.pay_time <= '%s'", start.Format(time.DateTime), end.Format(time.DateTime))
|
||||
}
|
||||
err := app.ModuleClients.BundleDB.Raw(sql).Scan(&purchaseItems).Error
|
||||
if err != nil {
|
||||
return nil, errors.New("查询套餐购买导出失败")
|
||||
}
|
||||
result.Data = make([]*bundle.MetricsBundlePurchaseItem, 0, len(purchaseItems))
|
||||
for _, item := range purchaseItems {
|
||||
result.Data = append(result.Data, &bundle.MetricsBundlePurchaseItem{
|
||||
OrderNo: item.OrderNo,
|
||||
BundleName: item.BundleName,
|
||||
UserNum: item.UserNum,
|
||||
UserName: item.UserName,
|
||||
PhoneNumber: item.PhoneNumber,
|
||||
PayTime: item.PayTime,
|
||||
IncreaseVideoCount: int64(item.IncreaseVideoCount),
|
||||
BundleAmount: item.BundleAmount,
|
||||
IncreaseAmount: item.IncreaseAmount,
|
||||
PaymentAmount: item.PaymentAmount,
|
||||
FinalAmount: item.FinalAmount,
|
||||
FeeAmount: item.FeeAmount,
|
||||
Rate: 1,
|
||||
})
|
||||
}
|
||||
fmt.Println(result.Data[0].OrderNo)
|
||||
err := app.ModuleClients.BundleDB.Raw(sql).Find(&result.Data).Error
|
||||
lo.ForEach(result.Data, func(item *bundle.MetricsBundlePurchaseItem, index int) {
|
||||
item.FinalAmount = item.PaymentAmount - item.FeeAmount
|
||||
item.Rate = 1
|
||||
})
|
||||
return result, err
|
||||
}
|
||||
|
||||
@ -1335,22 +1278,16 @@ func MetricsArtistAccountExport(req *bundle.MetricsArtistAccountExportReq) (*bun
|
||||
query := app.ModuleClients.BundleDB.Table("( ? ) cma", subQuery).
|
||||
Select(`tiktok.platform_user_id as tiktok_account,
|
||||
tiktok.platform_user_name as tiktok_nickname,
|
||||
tiktok_auth.auth_status as tiktok_auth_status,
|
||||
dm.platform_user_id as dm_account,
|
||||
dm.platform_user_name as dm_nickname,
|
||||
dm_auth.auth_status as dm_auth_status,
|
||||
ins.platform_user_id as instagram_account,
|
||||
ins.platform_user_name as instagram_nickname,
|
||||
ins_auth.auth_status as ins_auth_status,
|
||||
cma.artist_name,
|
||||
bor.customer_num as user_num
|
||||
`).
|
||||
Joins(`left join (SELECT * FROM cast_media_account where platform_id = 1 and deleted_at = 0) tiktok on tiktok.artist_uuid = cma.artist_uuid`).
|
||||
Joins(`left join (Select * from cast_media_auth where platform_id = 1 and deleted_at = 0) tiktok_auth on tiktok_auth.user_id = tiktok.user_id`).
|
||||
Joins(`left join (SELECT * FROM cast_media_account where platform_id = 4 and deleted_at = 0) dm on dm.artist_uuid = cma.artist_uuid`).
|
||||
Joins(`left join (Select * from cast_media_auth where platform_id = 4 and deleted_at = 0) dm_auth on dm_auth.user_id = dm.user_id`).
|
||||
Joins(`left join (SELECT * FROM cast_media_account where platform_id = 3 and deleted_at = 0) ins on ins.artist_uuid = cma.artist_uuid`).
|
||||
Joins(`left join (Select * from cast_media_auth where platform_id = 3 and deleted_at = 0) ins_auth on ins_auth.user_id = ins.user_id`).
|
||||
Joins(`left join bundle_order_records bor on bor.customer_id COLLATE utf8mb4_general_ci= cma.artist_uuid COLLATE utf8mb4_general_ci`).
|
||||
Where("bor.deleted_at is null")
|
||||
if req.Month != "" {
|
||||
@ -1378,7 +1315,7 @@ func MetricsVideoSubmitExport(req *bundle.MetricsVideoSubmitExportReq) (result *
|
||||
Joins("left join (select created_at,work_uuid from cast_work_platform_info cwi where cwi.platform_id = 4) dm on dm.work_uuid = cw.uuid").
|
||||
Joins("left join (select created_at,work_uuid from cast_work_platform_info cwi where cwi.platform_id = 3) ins on ins.work_uuid = cw.uuid").
|
||||
Joins("left join bundle_order_records bor on bor.customer_id COLLATE utf8mb4_general_ci = cw.artist_uuid COLLATE utf8mb4_general_ci").
|
||||
Where("(tiktok.created_at is not null or dm.created_at is not null or ins.created_at is not null) and cw.deleted_at = 0 and bor.deleted_at is null and cw.origin_uuid = ''").
|
||||
Where("(tiktok.created_at is not null or dm.created_at is not null or ins.created_at is not null) and cw.deleted_at = 0 and bor.deleted_at is null").
|
||||
Order("cw.artist_name")
|
||||
} else {
|
||||
|
||||
@ -1394,7 +1331,7 @@ func MetricsVideoSubmitExport(req *bundle.MetricsVideoSubmitExportReq) (result *
|
||||
Joins(`LEFT JOIN cast_work_platform_info dm ON dm.work_uuid = cw.uuid AND dm.platform_id = 4 AND dm.created_at >= ? AND dm.created_at <= ?`, start.Unix(), end.Unix()).
|
||||
Joins(`LEFT JOIN cast_work_platform_info ins ON ins.work_uuid = cw.uuid AND ins.platform_id = 3 AND ins.created_at >= ? AND ins.created_at <= ?`, start.Unix(), end.Unix()).
|
||||
Joins(`LEFT JOIN bundle_order_records bor ON bor.customer_id COLLATE utf8mb4_general_ci = cw.artist_uuid COLLATE utf8mb4_general_ci AND bor.deleted_at IS NULL`).
|
||||
Where(`cw.origin_uuid = '' and cw.deleted_at = 0 AND (tiktok.created_at IS NOT NULL OR dm.created_at IS NOT NULL OR ins.created_at IS NOT NULL)`).
|
||||
Where(`cw.deleted_at = 0 AND (tiktok.created_at IS NOT NULL OR dm.created_at IS NOT NULL OR ins.created_at IS NOT NULL)`).
|
||||
Order("cw.artist_name")
|
||||
|
||||
}
|
||||
|
||||
@ -359,7 +359,6 @@ func OrderRecordDetail(req *bundle.OrderRecordsDetailRequest) (res *bundle.Order
|
||||
ValueAddBundleAmount: orderRecord.ValueAddBundleAmount,
|
||||
TotalAmount: orderRecord.TotalAmount,
|
||||
ExpirationTime: orderRecord.ExpirationTime,
|
||||
ReSignature: int32(orderRecord.ReSignature),
|
||||
}
|
||||
res.AddInfos = make([]*bundle.AddInfo, 0)
|
||||
res.AddInfos = addInfos
|
||||
@ -850,7 +849,6 @@ func ListUnfinishedInfos(req *bundle.AutoCreateUserAndOrderRequest) (res *bundle
|
||||
unfinishedInfo.OrderPayCurrency = info.OrderPayCurrency
|
||||
unfinishedInfo.OrderAccountCurrency = info.OrderAccountCurrency
|
||||
unfinishedInfo.PayTime = info.PayTime.Format("2006-01-02 15:04:05")
|
||||
unfinishedInfo.CardNum = info.CardNum
|
||||
res.UnfinishedInfos = append(res.UnfinishedInfos, unfinishedInfo)
|
||||
}
|
||||
|
||||
@ -876,71 +874,3 @@ func SoftDeleteUnfinishedInfo(req *bundle.SoftDeleteUnfinishedInfoRequest) (res
|
||||
|
||||
return res, nil
|
||||
}
|
||||
func ReSignTheContract(req *bundle.ReSignTheContractRequest) (*bundle.CommonResponse, error) {
|
||||
res := new(bundle.CommonResponse)
|
||||
|
||||
// 验证请求参数
|
||||
if req.OrderNo == "" {
|
||||
return res, errors.New("订单号不能为空")
|
||||
}
|
||||
|
||||
now := time.Now().Format("2006-01-02 15:04:05")
|
||||
|
||||
// 开启事务确保两个表的更新一致性
|
||||
tx := app.ModuleClients.BundleDB.Begin()
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
tx.Rollback()
|
||||
//err = fmt.Errorf("事务执行失败: %v", r)
|
||||
}
|
||||
}()
|
||||
|
||||
// 1. 更新 BundleOrderRecords 表
|
||||
recordsUpdate := map[string]interface{}{
|
||||
"sign_contract": req.SignContract,
|
||||
"signed_time": now,
|
||||
"contract_no": req.ContractNo,
|
||||
"re_signature": 2,
|
||||
}
|
||||
|
||||
if err := tx.Model(&model.BundleOrderRecords{}).
|
||||
Where("order_no = ?", req.OrderNo).
|
||||
Updates(recordsUpdate).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return res, fmt.Errorf("更新订单记录失败: %v", err)
|
||||
}
|
||||
|
||||
// 2. 更新 BundleOrderValueAdd 表
|
||||
valueAddUpdate := map[string]interface{}{
|
||||
"sign_contract": req.SignContract,
|
||||
"signed_time": now,
|
||||
}
|
||||
|
||||
if err := tx.Model(&model.BundleOrderValueAdd{}).
|
||||
Where("order_no = ?", req.OrderNo).
|
||||
Updates(valueAddUpdate).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return res, fmt.Errorf("更新订单增值信息失败: %v", err)
|
||||
}
|
||||
|
||||
// 3. 检查是否实际更新了记录
|
||||
var affectedRecords, affectedValueAdd int64
|
||||
tx.Model(&model.BundleOrderRecords{}).Where("order_no = ?", req.OrderNo).Count(&affectedRecords)
|
||||
tx.Model(&model.BundleOrderValueAdd{}).Where("order_no = ?", req.OrderNo).Count(&affectedValueAdd)
|
||||
|
||||
if affectedRecords == 0 {
|
||||
tx.Rollback()
|
||||
return res, errors.New("未找到对应的订单记录")
|
||||
}
|
||||
|
||||
// 提交事务
|
||||
if err := tx.Commit().Error; err != nil {
|
||||
return res, fmt.Errorf("事务提交失败: %v", err)
|
||||
}
|
||||
|
||||
// 设置响应信息(如果有需要)
|
||||
res.Msg = "重新签约成功"
|
||||
res.OrderNo = req.OrderNo
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
||||
@ -581,25 +581,29 @@ assigned_pending_agg AS (
|
||||
aw.user_id,
|
||||
COALESCE(SUM(
|
||||
CASE
|
||||
WHEN tar.actual_status = 1 THEN tar.pending_video_script_count
|
||||
WHEN tar.actual_status = 1 THEN tar.assign_video_script_count
|
||||
WHEN tar.actual_status = 3 THEN tar.complete_video_script_count
|
||||
ELSE 0
|
||||
END
|
||||
), 0) AS assigned_video_script_count,
|
||||
COALESCE(SUM(
|
||||
CASE
|
||||
WHEN tar.actual_status = 1 THEN tar.pending_video_count
|
||||
WHEN tar.actual_status = 1 THEN tar.assign_video_count
|
||||
WHEN tar.actual_status = 3 THEN tar.complete_video_count
|
||||
ELSE 0
|
||||
END
|
||||
), 0) AS assigned_video_count,
|
||||
COALESCE(SUM(
|
||||
CASE
|
||||
WHEN tar.actual_status = 1 THEN tar.pending_post_count
|
||||
WHEN tar.actual_status = 1 THEN tar.assign_post_count
|
||||
WHEN tar.actual_status = 3 THEN tar.complete_post_count
|
||||
ELSE 0
|
||||
END
|
||||
), 0) AS assigned_post_count,
|
||||
COALESCE(SUM(
|
||||
CASE
|
||||
WHEN tar.actual_status = 1 THEN tar.pending_data_count
|
||||
WHEN tar.actual_status = 1 THEN tar.assign_data_count
|
||||
WHEN tar.actual_status = 3 THEN tar.complete_data_count
|
||||
ELSE 0
|
||||
END
|
||||
), 0) AS assigned_data_count
|
||||
@ -1062,25 +1066,29 @@ assigned_pending_agg AS (
|
||||
aw.user_id,
|
||||
COALESCE(SUM(
|
||||
CASE
|
||||
WHEN tar.actual_status = 1 THEN tar.pending_video_script_count
|
||||
WHEN tar.actual_status = 1 THEN tar.assign_video_script_count
|
||||
WHEN tar.actual_status = 3 THEN tar.complete_video_script_count
|
||||
ELSE 0
|
||||
END
|
||||
), 0) AS assigned_video_script_count,
|
||||
COALESCE(SUM(
|
||||
CASE
|
||||
WHEN tar.actual_status = 1 THEN tar.pending_video_count
|
||||
WHEN tar.actual_status = 1 THEN tar.assign_video_count
|
||||
WHEN tar.actual_status = 3 THEN tar.complete_video_count
|
||||
ELSE 0
|
||||
END
|
||||
), 0) AS assigned_video_count,
|
||||
COALESCE(SUM(
|
||||
CASE
|
||||
WHEN tar.actual_status = 1 THEN tar.pending_post_count
|
||||
WHEN tar.actual_status = 1 THEN tar.assign_post_count
|
||||
WHEN tar.actual_status = 3 THEN tar.complete_post_count
|
||||
ELSE 0
|
||||
END
|
||||
), 0) AS assigned_post_count,
|
||||
COALESCE(SUM(
|
||||
CASE
|
||||
WHEN tar.actual_status = 1 THEN tar.pending_data_count
|
||||
WHEN tar.actual_status = 1 THEN tar.assign_data_count
|
||||
WHEN tar.actual_status = 3 THEN tar.complete_data_count
|
||||
ELSE 0
|
||||
END
|
||||
), 0) AS assigned_data_count
|
||||
@ -3271,67 +3279,3 @@ func CreateMissingTaskManagementRecords(validArtist []ValidArtistInfo) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CreateTaskWorkLogRequest 创建任务日志请求参数
|
||||
type CreateTaskWorkLogRequest struct {
|
||||
AssignRecordsUUID string `json:"assignRecordsUUID"` // 任务指派记录UUID(必填)
|
||||
WorkUUID string `json:"workUUID"` // 任务作品UUID(必填)
|
||||
Title string `json:"title"` // 任务作品标题
|
||||
|
||||
ArtistUUID string `json:"artistUUID"` // 任务艺人UUID
|
||||
SubNum string `json:"subNum"` // 任务用户编号(必填)
|
||||
TelNum string `json:"telNum"` // 任务用户手机号(必填)
|
||||
ArtistName string `json:"artistName"` // 任务艺人名称
|
||||
|
||||
// 操作信息
|
||||
OperationType int `json:"operationType"` // 任务操作类型 1:加任务 2:消耗任务 3:完成任务 4:任务过期(必填)
|
||||
TaskType int `json:"taskType"` // 任务类型 1:视频 2:图片 3:数据分析(必填)
|
||||
TaskCount int `json:"taskCount"` // 任务数量(必填)
|
||||
Remark string `json:"remark"` // 任务备注
|
||||
|
||||
// 操作人信息
|
||||
OperatorName string `json:"operatorName"` // 任务操作人姓名
|
||||
OperatorNum string `json:"operatorNum"` // 任务操作人账号
|
||||
}
|
||||
|
||||
// CreateTaskWorkLog 创建任务日志记录
|
||||
func CreateTaskWorkLog(req *CreateTaskWorkLogRequest) error {
|
||||
// 参数校验
|
||||
if req == nil {
|
||||
return commonErr.ReturnError(nil, "参数错误", "请求参数不能为空")
|
||||
}
|
||||
|
||||
// 生成日志UUID
|
||||
workLogUUID := uuid.New().String()
|
||||
|
||||
// 获取当前时间戳(Unix时间戳,秒级)
|
||||
now := int(time.Now().Unix())
|
||||
|
||||
// 构建日志记录
|
||||
workLog := &model.TaskWorkLog{
|
||||
WorkLogUUID: workLogUUID,
|
||||
AssignRecordsUUID: req.AssignRecordsUUID,
|
||||
WorkUUID: req.WorkUUID,
|
||||
Title: req.Title,
|
||||
ArtistUUID: req.ArtistUUID,
|
||||
SubNum: req.SubNum,
|
||||
TelNum: req.TelNum,
|
||||
ArtistName: req.ArtistName,
|
||||
OperationType: req.OperationType,
|
||||
TaskType: req.TaskType,
|
||||
TaskCount: req.TaskCount,
|
||||
Remark: req.Remark,
|
||||
OperatorName: req.OperatorName,
|
||||
OperatorNum: req.OperatorNum,
|
||||
OperationTime: now,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
|
||||
// 插入数据库
|
||||
if err := app.ModuleClients.TaskBenchDB.Create(workLog).Error; err != nil {
|
||||
return commonErr.ReturnError(err, "创建任务日志失败", "创建任务日志失败: ")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -11,8 +11,6 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"micro-bundle/pkg/msg"
|
||||
|
||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
||||
"github.com/jinzhu/copier"
|
||||
"github.com/samber/lo"
|
||||
@ -196,39 +194,25 @@ func GetBundleBalanceByUserId(req *bundle.GetBundleBalanceByUserIdReq) (*bundle.
|
||||
if data.Activate != 2 {
|
||||
return nil, errors.New("套餐未激活")
|
||||
}
|
||||
var IsExpired int32
|
||||
if data.ExpiredAt.Before(time.Now()) {
|
||||
IsExpired = msg.IsExpired //已过期
|
||||
} else {
|
||||
IsExpired = msg.NotExpired //未过期
|
||||
}
|
||||
result := &bundle.GetBundleBalanceByUserIdResp{
|
||||
OrderUUID: data.OrderUUID,
|
||||
BundleName: data.BundleName,
|
||||
BundleStatus: IsExpired,
|
||||
PayTime: data.StartAt.UnixMilli(),
|
||||
ExpiredTime: data.ExpiredAt.UnixMilli(),
|
||||
PaymentAmount: data.PaymentAmount,
|
||||
PaymentType: data.PaymentType,
|
||||
AccountNumber: int32(data.BundleAccountNumber) + int32(data.IncreaseAccountNumber) + int32(data.ManualAccountNumber),
|
||||
AccountExtendNumber: int32(data.BundleAccountNumber) + int32(data.IncreaseAccountNumber) + int32(data.ManualAccountNumber),
|
||||
AccountAdditional: int32(data.ManualAccountNumber),
|
||||
AccountConsumptionNumber: int32(data.BundleAccountConsumptionNumber) + int32(data.IncreaseAccountConsumptionNumber) + int32(data.ManualAccountConsumptionNumber),
|
||||
VideoNumber: int32(data.BundleVideoNumber) + int32(data.BundleLimitVideoNumber) + int32(data.BundleLimitVideoExpiredNumber) + int32(data.IncreaseVideoNumber) + int32(data.IncreaseLimitVideoNumber) + int32(data.IncreaseLimitVideoExpiredNumber) + int32(data.ManualVideoNumber),
|
||||
VideoExtendNumber: int32(data.MonthlyBundleLimitVideoNumber) + int32(data.MonthlyIncreaseLimitVideoNumber) + int32(data.MonthlyBundleLimitExpiredVideoNumber) + int32(data.MonthlyIncreaseLimitExpiredVideoNumber) + int32(data.ManualVideoNumber) + int32(data.IncreaseVideoNumber) + int32(data.BundleVideoNumber),
|
||||
VideoExtendConsumptionNumber: int32(data.MonthlyBundleLimitVideoConsumptionNumber) + int32(data.MonthlyIncreaseLimitVideoConsumptionNumber) + int32(data.MonthlyBundleLimitExpiredVideoConsumptionNumber) + int32(data.MonthlyIncreaseLimitExpiredVideoConsumptionNumber) + int32(data.ManualVideoConsumptionNumber) + int32(data.IncreaseVideoConsumptionNumber) + int32(data.BundleVideoConsumptionNumber),
|
||||
VideoAdditional: int32(data.ManualVideoNumber),
|
||||
VideoConsumptionNumber: int32(data.BundleVideoConsumptionNumber) + int32(data.BundleLimitVideoConsumptionNumber) + int32(data.BundleLimitVideoExpiredConsumptionNumber) + int32(data.IncreaseVideoConsumptionNumber) + int32(data.IncreaseLimitVideoConsumptionNumber) + int32(data.IncreaseLimitVideoExpiredConsumptionNumber) + int32(data.ManualVideoConsumptionNumber),
|
||||
ImageNumber: int32(data.BundleImageNumber) + int32(data.BundleLimitImageNumber) + int32(data.BundleLimitImageExpiredNumber) + int32(data.IncreaseImageNumber) + int32(data.IncreaseLimitImageNumber) + int32(data.IncreaseLimitImageExpiredNumber) + int32(data.ManualImageNumber),
|
||||
ImageExtendNumber: int32(data.MonthlyBundleLimitImageNumber) + int32(data.MonthlyIncreaseLimitImageNumber) + int32(data.MonthlyBundleLimitExpiredImageNumber) + int32(data.MonthlyIncreaseLimitExpiredImageNumber) + int32(data.ManualImageNumber) + int32(data.IncreaseImageNumber) + int32(data.BundleImageNumber),
|
||||
ImageExtendConsumptionNumber: int32(data.MonthlyBundleLimitImageConsumptionNumber) + int32(data.MonthlyIncreaseLimitImageConsumptionNumber) + int32(data.MonthlyBundleLimitExpiredImageConsumptionNumber) + int32(data.MonthlyIncreaseLimitExpiredImageConsumptionNumber) + int32(data.ManualImageConsumptionNumber) + int32(data.IncreaseImageConsumptionNumber) + int32(data.BundleImageConsumptionNumber),
|
||||
ImageAdditional: int32(data.ManualImageNumber),
|
||||
ImageConsumptionNumber: int32(data.BundleImageConsumptionNumber) + int32(data.BundleLimitImageConsumptionNumber) + int32(data.BundleLimitImageExpiredConsumptionNumber) + int32(data.IncreaseImageConsumptionNumber) + int32(data.IncreaseLimitImageConsumptionNumber) + int32(data.IncreaseLimitImageExpiredConsumptionNumber) + int32(data.ManualImageConsumptionNumber),
|
||||
DataAnalysisNumber: int32(data.BundleDataAnalysisNumber) + int32(data.BundleLimitDataAnalysisNumber) + int32(data.BundleLimitDataAnalysisExpiredNumber) + int32(data.IncreaseDataAnalysisNumber) + int32(data.IncreaseLimitDataAnalysisNumber) + int32(data.IncreaseLimitDataAnalysisExpiredNumber) + int32(data.ManualDataAnalysisNumber),
|
||||
DataAnalysisExtendNumber: int32(data.MonthlyBundleLimitDataAnalysisNumber) + int32(data.MonthlyIncreaseLimitDataAnalysisNumber) + int32(data.MonthlyBundleLimitExpiredDataAnalysisNumber) + int32(data.MonthlyIncreaseLimitExpiredDataAnalysisNumber) + int32(data.ManualDataAnalysisNumber) + int32(data.IncreaseDataAnalysisNumber) + int32(data.BundleDataAnalysisNumber),
|
||||
DataAnalysisExtendConsumptionNumber: int32(data.MonthlyBundleLimitDataAnalysisConsumptionNumber) + int32(data.MonthlyIncreaseLimitDataAnalysisConsumptionNumber) + int32(data.MonthlyBundleLimitExpiredDataAnalysisConsumptionNumber) + int32(data.MonthlyIncreaseLimitExpiredDataAnalysisConsumptionNumber) + int32(data.ManualDataAnalysisConsumptionNumber) + int32(data.IncreaseDataAnalysisConsumptionNumber) + int32(data.BundleDataAnalysisConsumptionNumber),
|
||||
DataAnalysisAdditional: int32(data.ManualDataAnalysisNumber),
|
||||
DataAnalysisConsumptionNumber: int32(data.BundleDataAnalysisConsumptionNumber) + int32(data.BundleLimitDataAnalysisConsumptionNumber) + int32(data.BundleLimitDataAnalysisExpiredConsumptionNumber) + int32(data.IncreaseDataAnalysisConsumptionNumber) + int32(data.IncreaseLimitDataAnalysisConsumptionNumber) + int32(data.IncreaseLimitDataAnalysisExpiredConsumptionNumber) + int32(data.ManualDataAnalysisConsumptionNumber),
|
||||
OrderUUID: data.OrderUUID,
|
||||
BundleName: data.BundleName,
|
||||
PayTime: data.StartAt.UnixMilli(),
|
||||
ExpiredTime: data.ExpiredAt.UnixMilli(),
|
||||
PaymentAmount: data.PaymentAmount,
|
||||
PaymentType: data.PaymentType,
|
||||
AccountNumber: int32(data.BundleAccountNumber) + int32(data.IncreaseAccountNumber) + int32(data.ManualAccountNumber),
|
||||
AccountAdditional: int32(data.ManualAccountNumber),
|
||||
AccountConsumptionNumber: int32(data.BundleAccountConsumptionNumber) + int32(data.IncreaseAccountConsumptionNumber) + int32(data.ManualAccountConsumptionNumber),
|
||||
VideoNumber: int32(data.BundleVideoNumber) + int32(data.BundleLimitVideoNumber) + int32(data.BundleLimitVideoExpiredNumber) + int32(data.IncreaseVideoNumber) + int32(data.IncreaseLimitVideoNumber) + int32(data.IncreaseLimitVideoExpiredNumber) + int32(data.ManualVideoNumber),
|
||||
VideoAdditional: int32(data.ManualVideoNumber),
|
||||
VideoConsumptionNumber: int32(data.BundleVideoConsumptionNumber) + int32(data.BundleLimitVideoConsumptionNumber) + int32(data.BundleLimitVideoExpiredConsumptionNumber) + int32(data.IncreaseVideoConsumptionNumber) + int32(data.IncreaseLimitVideoConsumptionNumber) + int32(data.IncreaseLimitVideoExpiredConsumptionNumber) + int32(data.ManualVideoConsumptionNumber),
|
||||
ImageNumber: int32(data.BundleImageNumber) + int32(data.BundleLimitImageNumber) + int32(data.BundleLimitImageExpiredNumber) + int32(data.IncreaseImageNumber) + int32(data.IncreaseLimitImageNumber) + int32(data.IncreaseLimitImageExpiredNumber) + int32(data.ManualImageNumber),
|
||||
ImageAdditional: int32(data.ManualImageNumber),
|
||||
ImageConsumptionNumber: int32(data.BundleImageConsumptionNumber) + int32(data.BundleLimitImageConsumptionNumber) + int32(data.BundleLimitImageExpiredConsumptionNumber) + int32(data.IncreaseImageConsumptionNumber) + int32(data.IncreaseLimitImageConsumptionNumber) + int32(data.IncreaseLimitImageExpiredConsumptionNumber) + int32(data.ManualImageConsumptionNumber),
|
||||
DataAnalysisNumber: int32(data.BundleDataAnalysisNumber) + int32(data.BundleLimitDataAnalysisNumber) + int32(data.BundleLimitDataAnalysisExpiredNumber) + int32(data.IncreaseDataAnalysisNumber) + int32(data.IncreaseLimitDataAnalysisNumber) + int32(data.IncreaseLimitDataAnalysisExpiredNumber) + int32(data.ManualDataAnalysisNumber),
|
||||
DataAnalysisAdditional: int32(data.ManualDataAnalysisNumber),
|
||||
DataAnalysisConsumptionNumber: int32(data.BundleDataAnalysisConsumptionNumber) + int32(data.BundleLimitDataAnalysisConsumptionNumber) + int32(data.BundleLimitDataAnalysisExpiredConsumptionNumber) + int32(data.IncreaseDataAnalysisConsumptionNumber) + int32(data.IncreaseLimitDataAnalysisConsumptionNumber) + int32(data.IncreaseLimitDataAnalysisExpiredConsumptionNumber) + int32(data.ManualDataAnalysisConsumptionNumber),
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
@ -463,24 +447,6 @@ func ConfirmWork(req *bundle.ConfirmWorkReq) (*bundle.ConfirmWorkResp, error) {
|
||||
return nil, dao.ConfirmWork(req)
|
||||
}
|
||||
|
||||
func GetWaitConfirmWorkList(req *bundle.GetWaitConfirmWorkListReq) (*bundle.GetWaitConfirmWorkListResp, error) {
|
||||
data, err := dao.GetWaitConfirmWorkList()
|
||||
if err != nil {
|
||||
logger.Error(err)
|
||||
return nil, errors.New("查询失败")
|
||||
}
|
||||
result := &bundle.GetWaitConfirmWorkListResp{}
|
||||
result.Data = lo.Map(data, func(m model.CastWork, _ int) *bundle.ConfirmWorkItem {
|
||||
return &bundle.ConfirmWorkItem{
|
||||
WorkUuid: m.Uuid,
|
||||
WorkCategory: int32(m.WorkCategory),
|
||||
ArtistName: m.ArtistName,
|
||||
ArtistUuid: m.ArtistUuid,
|
||||
}
|
||||
})
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func BundleActivate(req *bundle.BundleActivateReq) error {
|
||||
return dao.BundleActivate(req.Ids)
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ func SaveBundle(req *bundle.BundleProfile) (res *bundle.SaveResponse, err error)
|
||||
Content: req.Content,
|
||||
Price: req.Price,
|
||||
PriceType: req.PriceType,
|
||||
Contract: "https://e-cdn.fontree.cn/fonchain-main/prod/file/contract/saas/template-25122501.pdf",
|
||||
Contract: "https://e-cdn.fontree.cn/fonchain-main/prod/file/saas/contract/template-25032801.pdf",
|
||||
ImgOption: int8(req.ImgOption),
|
||||
BgImg1: req.BgImg1,
|
||||
BgImg2: req.BgImg2,
|
||||
|
||||
@ -182,8 +182,3 @@ func SoftDeleteUnfinishedInfo(req *bundle.SoftDeleteUnfinishedInfoRequest) (res
|
||||
res, err = dao.SoftDeleteUnfinishedInfo(req)
|
||||
return
|
||||
}
|
||||
func ReSignTheContract(req *bundle.ReSignTheContractRequest) (res *bundle.CommonResponse, err error) {
|
||||
res = new(bundle.CommonResponse)
|
||||
res, err = dao.ReSignTheContract(req)
|
||||
return
|
||||
}
|
||||
|
||||
@ -546,22 +546,3 @@ func AddHiddenTaskAssignee(taskAssignee string, taskAssigneeNum string) error {
|
||||
}
|
||||
return dao.AddHiddenTaskAssignee(taskAssignee, taskAssigneeNum)
|
||||
}
|
||||
|
||||
// CreateTaskWorkLog 创建任务日志记录
|
||||
// 用于记录任务操作日志,包括加任务、消耗任务、完成任务、任务过期等操作
|
||||
func CreateTaskWorkLog(req *dao.CreateTaskWorkLogRequest) error {
|
||||
// 参数校验已在 DAO 层完成,这里可以添加额外的业务逻辑校验
|
||||
// 例如:校验操作类型是否合法、任务类型是否合法等
|
||||
if req.OperationType < 1 || req.OperationType > 4 {
|
||||
return commonErr.ReturnError(nil, "参数错误", "操作类型必须在1-4之间")
|
||||
}
|
||||
if req.TaskType < 1 || req.TaskType > 3 {
|
||||
return commonErr.ReturnError(nil, "参数错误", "任务类型必须在1-3之间")
|
||||
}
|
||||
if req.TaskCount < 0 {
|
||||
return commonErr.ReturnError(nil, "参数错误", "任务数量不能为负数")
|
||||
}
|
||||
|
||||
// 调用 DAO 层创建日志
|
||||
return dao.CreateTaskWorkLog(req)
|
||||
}
|
||||
|
||||
@ -378,19 +378,3 @@ type ManualIncreaseBundleBalance struct {
|
||||
TotalImageAdditional int `gorm:"column:total_image_additional"`
|
||||
TotalDataAnalysisAdditional int `gorm:"column:total_data_analysis_additional"`
|
||||
}
|
||||
|
||||
// 套餐购买导出
|
||||
type PurchaseItem struct {
|
||||
OrderNo string `gorm:"column:orderNo"`
|
||||
BundleName string `gorm:"column:bundleName"`
|
||||
UserNum string `gorm:"column:userNum"`
|
||||
UserName string `gorm:"column:userName"`
|
||||
PhoneNumber string `gorm:"column:phoneNumber"`
|
||||
PayTime string `gorm:"column:payTime"`
|
||||
IncreaseVideoCount float64 `gorm:"column:increaseVideoCount"`
|
||||
BundleAmount float32 `gorm:"column:bundleAmount"`
|
||||
IncreaseAmount float32 `gorm:"column:increaseAmount"`
|
||||
PaymentAmount float32 `gorm:"column:paymentAmount"`
|
||||
FinalAmount float32 `gorm:"column:finalAmount"`
|
||||
FeeAmount float32 `gorm:"column:feeAmount"`
|
||||
}
|
||||
|
||||
@ -41,7 +41,6 @@ type BundleOrderRecords struct {
|
||||
BundleCommonJson json.RawMessage `json:"bundle_common_json" gorm:"column:bundle_common_json;type:json;serializer:json;comment:套餐信息"`
|
||||
Language string `gorm:"column:language;comment:语言" json:"language"`
|
||||
BundleOrderValueAdd []BundleOrderValueAdd `gorm:"foreignKey:OrderUUID;references:UUID" json:"bundleOrderValueAdd"`
|
||||
ReSignature int `json:"reSignature" gorm:"column:re_signature;default:2;type:int;comment:是否重新签 1:是 2:否"`
|
||||
}
|
||||
type BundleOrderValueAdd struct {
|
||||
gorm.Model
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 用来自动导入 来创建用户和订单的 数据
|
||||
@ -20,7 +19,6 @@ type FieePaymentAuto struct {
|
||||
UserIdCardFrontUrl string `json:"userIdCardFrontUrl" gorm:"column:user_id_card_front_url;type:varchar(1024);comment:用户身份证正面"`
|
||||
UserIdCardReverseUrl string `json:"userIdCardReverseUrl" gorm:"column:user_id_card_reverse_url;type:varchar(1024);comment:用户身份证反面"`
|
||||
UserIdCardValidity string `json:"userIdCardValidity" gorm:"column:user_id_card_validity;type:varchar(64);comment:证件有效期"`
|
||||
CardNum string `json:"cardNum" gorm:"column:card_num;type:varchar(64);comment:证件号码"`
|
||||
OrderNo string `json:"orderNo" gorm:"column:order_no;type:varchar(128);comment:订单编号"`
|
||||
OrderPayAmount string `gorm:"column:order_pay_amount;type:decimal(20,2);comment:订单支付金额" json:"orderPayAmount"`
|
||||
OrderSettlementAmount string `gorm:"column:order_settlement_amount;type:decimal(20,2);comment:订单结算金额" json:"orderSettlementAmount"`
|
||||
|
||||
@ -241,6 +241,41 @@ func (TaskSyncStatus) TableName() string { return "task_sync_status" }
|
||||
// InitialSyncKey 一次性同步的唯一标识键
|
||||
const InitialSyncKey = "bundle_to_task_balance_initial_sync"
|
||||
|
||||
// 任务日志表
|
||||
type TaskLog struct {
|
||||
LogUUID string `gorm:"column:log_uuid;type:varchar(50);comment:任务日志UUID;not null" json:"taskLogUUID"`
|
||||
SubNum string `gorm:"column:sub_num;comment:任务用户编号;index:idx_task_log_sub_num;not null" json:"taskSubNum"`
|
||||
TelNum string `gorm:"column:tel_num;comment:任务用户手机号;index:idx_task_log_tel_num;not null" json:"taskTelNum"`
|
||||
ArtistName string `gorm:"column:artist_name;comment:任务艺人名称;index:idx_task_log_artist_name" json:"taskArtistName"`
|
||||
|
||||
// ===== 操作信息 =====
|
||||
OperationType int `gorm:"column:operation_type;type:int(11);comment:任务操作类型 1:加任务 2:消耗任务 3:完成任务;4:任务过期;index:idx_task_operation_type;not null" json:"taskOperationType"`
|
||||
TaskType int `gorm:"column:task_type;type:int(11);comment:任务类型 1:视频 2:图片 3:数据分析;index:idx_task_type;not null" json:"taskType"`
|
||||
TaskCount int `gorm:"column:task_count;type:int(11);comment:任务数量;not null" json:"taskCount"`
|
||||
Remark string `gorm:"column:remark;type:varchar(500);comment:任务备注" json:"taskRemark"`
|
||||
|
||||
// ===== 操作人信息 =====
|
||||
OperatorName string `gorm:"column:operator_name;comment:任务操作人姓名;index:idx_task_operator_name" json:"taskOperatorName"`
|
||||
OperatorNum string `gorm:"column:operator_num;comment:任务操作人账号;index:idx_task_operator_num" json:"taskOperatorNum"`
|
||||
CompletorName string `gorm:"column:completor_name;comment:任务完成人姓名;index:idx_task_completor_name" json:"taskCompletorName"`
|
||||
CompletorNum string `gorm:"column:completor_num;comment:任务完成人账号;index:idx_task_completor_num" json:"taskCompletorNum"`
|
||||
|
||||
// ===== 关联ID字段 =====
|
||||
VideoPublishUUID string `gorm:"column:video_publish_id;type:varchar(50);comment:任务关联的发布视频UUID;index:idx_task_video_publish_id" json:"taskVideoPublishID"`
|
||||
PostPublishUUID string `gorm:"column:post_publish_id;type:varchar(50);comment:任务关联的图文发布UUID;index:idx_task_post_publish_id" json:"taskPostPublishID"`
|
||||
DataAnalysisUUID string `gorm:"column:data_analysis_id;type:varchar(50);comment:任务关联的数据分析UUID;index:idx_task_data_analysis_id" json:"taskDataAnalysisID"`
|
||||
|
||||
// ===== 时间字段 =====
|
||||
OperationTime int `gorm:"column:operation_time;type:int(11);comment:任务操作时间;index:idx_task_operation_time;not null" json:"taskOperationTime"`
|
||||
CreatedAt int `gorm:"column:created_at;type:int(11);comment:任务日志创建时间" json:"taskCreatedAt"`
|
||||
UpdatedAt int `gorm:"column:updated_at;type:int(11);comment:任务日志更新时间" json:"taskUpdatedAt"`
|
||||
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:int(11);index:idx_task_log_deleted_at" json:"taskDeletedAt"`
|
||||
}
|
||||
|
||||
func (t *TaskLog) TableName() string {
|
||||
return "task_log"
|
||||
}
|
||||
|
||||
// 隐藏指派人表
|
||||
type TaskAssigneeHidden struct {
|
||||
// 让id自增
|
||||
@ -256,36 +291,3 @@ type TaskAssigneeHidden struct {
|
||||
func (TaskAssigneeHidden) TableName() string {
|
||||
return "task_assignee_hidden"
|
||||
}
|
||||
|
||||
// 任务日志表
|
||||
type TaskWorkLog struct {
|
||||
WorkLogUUID string `gorm:"column:work_log_uuid;type:varchar(50);comment:任务作品日志UUID;primarykey;not null" json:"taskWorkLogUUID"`
|
||||
AssignRecordsUUID string `gorm:"column:assign_records_uuid;type:varchar(50);comment:任务指派记录UUID;index:idx_assign_records_uuid;not null" json:"assignRecordsUUID"`
|
||||
WorkUUID string `gorm:"column:work_uuid;type:varchar(50);comment:任务作品UUID;index:idx_work_uuid;not null" json:"workUUID"`
|
||||
Title string `gorm:"column:title;type:varchar(50);comment:任务作品标题;not null" default:"" json:"title"`
|
||||
|
||||
ArtistUUID string `gorm:"column:artist_uuid;type:varchar(50);comment:任务艺人UUID;index:idx_artist_uuid;not null" default:"" json:"artistUUID"`
|
||||
SubNum string `gorm:"column:sub_num;comment:任务用户编号;index:idx_sub_num;not null" default:"" json:"subNum"`
|
||||
TelNum string `gorm:"column:tel_num;comment:任务用户手机号;index:idx_tel_num;not null" default:"" json:"telNum"`
|
||||
ArtistName string `gorm:"column:artist_name;comment:任务艺人名称;index:idx_artist_name" default:"" json:"artistName"`
|
||||
|
||||
// ===== 操作信息 =====
|
||||
OperationType int `gorm:"column:operation_type;type:int(11);comment:任务操作类型 1:加任务 2:消耗任务 3:完成任务;4:任务过期;index:idx_operation_type;not null" default:"0" json:"operationType"`
|
||||
TaskType int `gorm:"column:task_type;type:int(11);comment:任务类型 1:视频 2:图片 3:数据分析;index:idx_task_type;not null" default:"0" json:"taskType"`
|
||||
TaskCount int `gorm:"column:task_count;type:int(11);comment:任务数量;not null" default:"0" json:"taskCount"`
|
||||
Remark string `gorm:"column:remark;type:varchar(500);comment:任务备注" default:"" json:"remark"`
|
||||
|
||||
// ===== 操作人信息 =====
|
||||
OperatorName string `gorm:"column:operator_name;comment:任务操作人姓名;index:idx_operator_name" json:"taskOperatorName"`
|
||||
OperatorNum string `gorm:"column:operator_num;comment:任务操作人账号;index:idx_operator_num" json:"taskOperatorNum"`
|
||||
|
||||
// ===== 时间字段 =====
|
||||
OperationTime int `gorm:"column:operation_time;type:int(11);comment:任务操作时间;index:idx_operation_time;not null" json:"taskOperationTime"`
|
||||
CreatedAt int `gorm:"column:created_at;type:int(11);comment:任务日志创建时间" json:"taskCreatedAt"`
|
||||
UpdatedAt int `gorm:"column:updated_at;type:int(11);comment:任务日志更新时间" json:"taskUpdatedAt"`
|
||||
DeletedAt soft_delete.DeletedAt `gorm:"column:deleted_at;type:int(11);index:idx_work_log_deleted_at" json:"taskDeletedAt"`
|
||||
}
|
||||
|
||||
func (t *TaskWorkLog) TableName() string {
|
||||
return "task_work_log"
|
||||
}
|
||||
|
||||
124
pb/bundle.proto
124
pb/bundle.proto
@ -37,7 +37,6 @@ service Bundle {
|
||||
rpc OrderRecordsListV2(OrderRecordsRequestV2) returns (OrderRecordsResponseV2) {}
|
||||
rpc OrderListByOrderNo(OrderInfoByOrderNoRequest) returns (OrderInfoByOrderNoResp) {}
|
||||
rpc OnlyAddValueListByOrderNo(OnlyAddValueListByOrderNoRequest) returns (OnlyAddValueListByOrderNoResp) {} // 根据orderNo只查增值服务
|
||||
rpc ReSignTheContract(ReSignTheContractRequest) returns (CommonResponse) {}
|
||||
|
||||
//增值套餐
|
||||
rpc CreateValueAddBundle(CreateValueAddBundleRequest) returns (CreateValueAddBundleResponse) {}
|
||||
@ -73,7 +72,6 @@ service Bundle {
|
||||
|
||||
rpc ToBeComfirmedWorks(ToBeComfirmedWorksReq) returns (ToBeComfirmedWorksResp) {} // 待确认作品列表
|
||||
rpc ConfirmWork(ConfirmWorkReq) returns (ConfirmWorkResp) {} // 确认作品
|
||||
rpc GetWaitConfirmWorkList(GetWaitConfirmWorkListReq) returns (GetWaitConfirmWorkListResp) {} // 获取待确认作品列表
|
||||
|
||||
//对账单
|
||||
rpc GetReconciliationList(GetReconciliationListReq) returns (GetReconciliationListResp) {} // 获取对账单列表
|
||||
@ -106,7 +104,6 @@ service Bundle {
|
||||
rpc GetPendingAssign(PendingAssignRequest) returns (PendingAssignResponse) {} // 查询艺人可指派数量
|
||||
rpc RevertTaskCompletionByUUIDItem(RevertTaskCompletionByUUIDItemRequest) returns (ComResponse) {}
|
||||
rpc AddHiddenTaskAssignee(AddHiddenTaskAssigneeRequest) returns (ComResponse) {}
|
||||
rpc CreateTaskWorkLog(CreateTaskWorkLogRequest) returns (CommonResponse) {} // 创建任务日志记录
|
||||
|
||||
//数据指标
|
||||
rpc MetricsBusiness(MetricsBusinessReq) returns (MetricsBusinessResp) {}
|
||||
@ -130,11 +127,6 @@ message ServiceInformation{
|
||||
uint64 num = 2;
|
||||
string unit = 3;
|
||||
}
|
||||
message ReSignTheContractRequest{
|
||||
string orderNo = 1;
|
||||
string contractNo = 2;
|
||||
string signContract = 3;
|
||||
}
|
||||
message DeleteValueAddServiceRequest{
|
||||
string orderNo = 1;
|
||||
uint64 userID = 2;
|
||||
@ -449,7 +441,6 @@ message OrderRecord {
|
||||
string expirationTime = 37 [json_name = "expirationTime"];
|
||||
string snapshot = 38 [json_name = "snapshot"];
|
||||
repeated AddInfo addInfos = 39 [json_name = "addInfos"];
|
||||
int32 reSignature = 40 [json_name = "reSignature"];
|
||||
}
|
||||
message AddInfo{
|
||||
string orderNo = 1 [json_name = "orderNo"];
|
||||
@ -1057,8 +1048,6 @@ message ToBeComfirmedWorksResp{
|
||||
repeated workItem data = 3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
message GetBundleBalanceByUserIdReq{
|
||||
int32 userId = 1;
|
||||
}
|
||||
@ -1067,31 +1056,24 @@ message GetBundleBalanceByUserIdResp{
|
||||
string orderUUID = 1;
|
||||
string bundleUuid = 2; // 套餐ID uuid
|
||||
string bundleName = 3; // 套餐名称
|
||||
int32 bundleStatus = 4; // 套餐状态是否过期 1 是 0 否
|
||||
string bundleStatus = 4; // 套餐名称
|
||||
int64 payTime = 5;
|
||||
int64 expiredTime = 6;
|
||||
string paymentAmount = 7;
|
||||
int32 paymentType = 8;
|
||||
int32 accountNumber = 9;
|
||||
int32 accountExtendNumber = 10;
|
||||
int32 accountAdditional = 11;
|
||||
int32 accountConsumptionNumber = 12;
|
||||
int32 videoNumber = 13;
|
||||
int32 videoExtendNumber = 14;
|
||||
int32 videoExtendConsumptionNumber = 15;
|
||||
int32 videoAdditional = 16;
|
||||
int32 videoConsumptionNumber = 17;
|
||||
int32 imageNumber = 18;
|
||||
int32 imageExtendNumber = 19;
|
||||
int32 imageExtendConsumptionNumber = 20;
|
||||
int32 imageAdditional = 21;
|
||||
int32 imageConsumptionNumber = 22;
|
||||
int32 dataAnalysisNumber = 23;
|
||||
int32 dataAnalysisExtendNumber = 24;
|
||||
int32 dataAnalysisExtendConsumptionNumber = 25;
|
||||
int32 dataAnalysisAdditional = 26;
|
||||
int32 dataAnalysisConsumptionNumber = 27;
|
||||
int32 expansionPacksNumber = 28;
|
||||
int32 accountNumber = 9;
|
||||
int32 accountAdditional = 10;
|
||||
int32 accountConsumptionNumber = 11;
|
||||
int32 videoNumber = 12;
|
||||
int32 videoAdditional = 13;
|
||||
int32 videoConsumptionNumber = 14;
|
||||
int32 imageNumber = 15;
|
||||
int32 imageAdditional = 16;
|
||||
int32 imageConsumptionNumber = 17;
|
||||
int32 dataAnalysisNumber = 18;
|
||||
int32 dataAnalysisAdditional = 19;
|
||||
int32 dataAnalysisConsumptionNumber = 20;
|
||||
int32 expansionPacksNumber = 21;
|
||||
}
|
||||
|
||||
message OnlyAddValueListByOrderNoRequest{
|
||||
@ -1124,20 +1106,6 @@ message ConfirmWorkResp{
|
||||
|
||||
}
|
||||
|
||||
message ConfirmWorkItem{
|
||||
string workUuid = 1;
|
||||
string artistName = 2;
|
||||
string artistUuid = 3;
|
||||
int32 workCategory = 4;
|
||||
}
|
||||
|
||||
message GetWaitConfirmWorkListReq{}
|
||||
|
||||
message GetWaitConfirmWorkListResp{
|
||||
repeated ConfirmWorkItem data = 1;
|
||||
}
|
||||
|
||||
|
||||
message AutoCreateUserAndOrderRequest {
|
||||
int32 num = 1; // 处理数量
|
||||
}
|
||||
@ -1166,7 +1134,6 @@ message UnfinishedInfo {
|
||||
string orderPayCurrency = 17;
|
||||
string orderAccountCurrency = 18;
|
||||
string payTime = 19;
|
||||
string cardNum = 20;
|
||||
}
|
||||
|
||||
message SoftDeleteUnfinishedInfoRequest {
|
||||
@ -1579,23 +1546,6 @@ message GetPendingTaskLayoutResp{ string data = 1; }
|
||||
message SetPendingTaskLayoutReq{ string data = 1; }
|
||||
message SetPendingTaskLayoutResp{}
|
||||
|
||||
// 创建任务日志请求
|
||||
message CreateTaskWorkLogRequest {
|
||||
string assignRecordsUUID = 1 [json_name = "assignRecordsUUID"]; // 任务指派记录UUID(必填)
|
||||
string workUUID = 2 [json_name = "workUUID"]; // 任务作品UUID(必填)
|
||||
string title = 3 [json_name = "title"]; // 任务作品标题
|
||||
string artistUUID = 4 [json_name = "artistUUID"]; // 任务艺人UUID
|
||||
string subNum = 5 [json_name = "subNum"]; // 任务用户编号(必填)
|
||||
string telNum = 6 [json_name = "telNum"]; // 任务用户手机号(必填)
|
||||
string artistName = 7 [json_name = "artistName"]; // 任务艺人名称
|
||||
int32 operationType = 8 [json_name = "operationType"]; // 任务操作类型 1:加任务 2:消耗任务 3:完成任务 4:任务过期(必填)
|
||||
int32 taskType = 9 [json_name = "taskType"]; // 任务类型 1:视频 2:图片 3:数据分析(必填)
|
||||
int32 taskCount = 10 [json_name = "taskCount"]; // 任务数量(必填)
|
||||
string remark = 11 [json_name = "remark"]; // 任务备注
|
||||
string operatorName = 12 [json_name = "operatorName"]; // 任务操作人姓名
|
||||
string operatorNum = 13 [json_name = "operatorNum"]; // 任务操作人账号
|
||||
}
|
||||
|
||||
message MetricsBusinessReq{
|
||||
string bundleUuid = 1;
|
||||
string start = 2;
|
||||
@ -1730,14 +1680,12 @@ message MetricsOperatingStatusResp {
|
||||
int64 autoConfirmDataAnalysisCount = 23;// 系统已自动确认数据数
|
||||
int64 pendingUploadDataAnalysisCount = 24;// 待发布数据数
|
||||
int64 uploadSuccessDataAnalysisCount = 25;// 发布成功数据数
|
||||
int64 uploadFailedDataAnalysisCount = 26;// 发布异常数据数
|
||||
|
||||
int64 abnormalAccountAcount = 27; // 触发预警的账号数
|
||||
|
||||
int64 abnormalAccountAcount = 26; // 触发预警的账号数
|
||||
}
|
||||
|
||||
message MetricsBundlePurchaseExportReq{
|
||||
string month = 1;//月份
|
||||
string endTime = 2;//结时间
|
||||
string month = 1;
|
||||
}
|
||||
|
||||
message MetricsBundlePurchaseExportResp{
|
||||
@ -1745,19 +1693,20 @@ message MetricsBundlePurchaseExportResp{
|
||||
}
|
||||
|
||||
message MetricsBundlePurchaseItem{
|
||||
string orderNo = 1;//订单编号
|
||||
string bundleName = 2;//套餐名称
|
||||
string userNum = 3;//用户编号
|
||||
string userName = 4;//客户名称
|
||||
string phoneNumber = 5;//手机号
|
||||
string payTime = 6;//支付时间
|
||||
int64 increaseVideoCount = 7;//增值服务视频数量
|
||||
float bundleAmount = 8;//套餐金额
|
||||
float increaseAmount = 9;//增值服务金额
|
||||
float paymentAmount = 10;//支付金额
|
||||
float finalAmount = 11;//结算金额
|
||||
float feeAmount = 12;//手续费
|
||||
int64 rate = 13;//汇率
|
||||
string orderNo = 1;
|
||||
string bundleName = 2;
|
||||
string userNum = 3;
|
||||
string userName = 4;
|
||||
string phoneNumber = 5;
|
||||
string payTime = 6;
|
||||
int64 bundleVideoCount = 7;
|
||||
int64 increaseVideoCount = 8;
|
||||
float bundleAmount = 9;
|
||||
float increaseAmount = 10;
|
||||
float paymentAmount = 11;
|
||||
float finalAmount = 12;
|
||||
float feeAmount = 13;
|
||||
int64 rate = 14;
|
||||
}
|
||||
|
||||
message MetricsArtistAccountExportReq{
|
||||
@ -1773,15 +1722,12 @@ message MetricsArtistAccountExportItem{
|
||||
string userNum = 2;
|
||||
string dmAccount = 3;
|
||||
string dmNickname = 4;
|
||||
int32 dmAuthStatus = 5;
|
||||
// string youtubeAccount = 3; 现在没有YouTube了
|
||||
// string youtubeNickname = 4;
|
||||
string instagramAccount = 6;
|
||||
string instagramNickname = 7;
|
||||
int32 insAuthStatus = 8;
|
||||
string tiktokAccount = 9;
|
||||
string tiktokNickname = 10;
|
||||
int32 tiktokAuthStatus = 11;
|
||||
string instagramAccount = 5;
|
||||
string instagramNickname = 6;
|
||||
string tiktokAccount = 7;
|
||||
string tiktokNickname = 8;
|
||||
}
|
||||
|
||||
|
||||
|
||||
12830
pb/bundle/bundle.pb.go
12830
pb/bundle/bundle.pb.go
File diff suppressed because it is too large
Load Diff
@ -40,9 +40,6 @@ func (this *QueryTheOrderSnapshotInformationResp) Validate() error {
|
||||
func (this *ServiceInformation) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ReSignTheContractRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DeleteValueAddServiceRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -509,22 +506,6 @@ func (this *ConfirmWorkReq) Validate() error {
|
||||
func (this *ConfirmWorkResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *ConfirmWorkItem) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetWaitConfirmWorkListReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *GetWaitConfirmWorkListResp) Validate() error {
|
||||
for _, item := range this.Data {
|
||||
if item != nil {
|
||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("Data", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AutoCreateUserAndOrderRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
@ -740,9 +721,6 @@ func (this *SetPendingTaskLayoutReq) Validate() error {
|
||||
func (this *SetPendingTaskLayoutResp) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *CreateTaskWorkLogRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *MetricsBusinessReq) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.21.1
|
||||
// - protoc-gen-go-triple v1.0.5
|
||||
// - protoc v6.32.0
|
||||
// source: pb/bundle.proto
|
||||
|
||||
package bundle
|
||||
@ -50,7 +50,6 @@ type BundleClient interface {
|
||||
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment)
|
||||
OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment)
|
||||
OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment)
|
||||
ReSignTheContract(ctx context.Context, in *ReSignTheContractRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
// 增值套餐
|
||||
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
|
||||
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
||||
@ -80,7 +79,6 @@ type BundleClient interface {
|
||||
GetVedioWorkDetail(ctx context.Context, in *GetVedioWorkDetailReq, opts ...grpc_go.CallOption) (*GetVedioeWorkDetailResp, common.ErrorWithAttachment)
|
||||
ToBeComfirmedWorks(ctx context.Context, in *ToBeComfirmedWorksReq, opts ...grpc_go.CallOption) (*ToBeComfirmedWorksResp, common.ErrorWithAttachment)
|
||||
ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts ...grpc_go.CallOption) (*ConfirmWorkResp, common.ErrorWithAttachment)
|
||||
GetWaitConfirmWorkList(ctx context.Context, in *GetWaitConfirmWorkListReq, opts ...grpc_go.CallOption) (*GetWaitConfirmWorkListResp, common.ErrorWithAttachment)
|
||||
// 对账单
|
||||
GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment)
|
||||
CreateReconciliation(ctx context.Context, in *ReconciliationInfo, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
@ -110,7 +108,6 @@ type BundleClient interface {
|
||||
GetPendingAssign(ctx context.Context, in *PendingAssignRequest, opts ...grpc_go.CallOption) (*PendingAssignResponse, common.ErrorWithAttachment)
|
||||
RevertTaskCompletionByUUIDItem(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
|
||||
AddHiddenTaskAssignee(ctx context.Context, in *AddHiddenTaskAssigneeRequest, opts ...grpc_go.CallOption) (*ComResponse, common.ErrorWithAttachment)
|
||||
CreateTaskWorkLog(ctx context.Context, in *CreateTaskWorkLogRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
// 数据指标
|
||||
MetricsBusiness(ctx context.Context, in *MetricsBusinessReq, opts ...grpc_go.CallOption) (*MetricsBusinessResp, common.ErrorWithAttachment)
|
||||
MetricsOperatingCreate(ctx context.Context, in *MetricsOperatingCreateReq, opts ...grpc_go.CallOption) (*MetricsOperatingCreateResp, common.ErrorWithAttachment)
|
||||
@ -148,7 +145,6 @@ type BundleClientImpl struct {
|
||||
OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||
OrderListByOrderNo func(ctx context.Context, in *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
||||
OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
||||
ReSignTheContract func(ctx context.Context, in *ReSignTheContractRequest) (*CommonResponse, error)
|
||||
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||
@ -174,7 +170,6 @@ type BundleClientImpl struct {
|
||||
GetVedioWorkDetail func(ctx context.Context, in *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
||||
ToBeComfirmedWorks func(ctx context.Context, in *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
||||
ConfirmWork func(ctx context.Context, in *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
||||
GetWaitConfirmWorkList func(ctx context.Context, in *GetWaitConfirmWorkListReq) (*GetWaitConfirmWorkListResp, error)
|
||||
GetReconciliationList func(ctx context.Context, in *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||
CreateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
||||
UpdateReconciliation func(ctx context.Context, in *ReconciliationInfo) (*CommonResponse, error)
|
||||
@ -201,7 +196,6 @@ type BundleClientImpl struct {
|
||||
GetPendingAssign func(ctx context.Context, in *PendingAssignRequest) (*PendingAssignResponse, error)
|
||||
RevertTaskCompletionByUUIDItem func(ctx context.Context, in *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error)
|
||||
AddHiddenTaskAssignee func(ctx context.Context, in *AddHiddenTaskAssigneeRequest) (*ComResponse, error)
|
||||
CreateTaskWorkLog func(ctx context.Context, in *CreateTaskWorkLogRequest) (*CommonResponse, error)
|
||||
MetricsBusiness func(ctx context.Context, in *MetricsBusinessReq) (*MetricsBusinessResp, error)
|
||||
MetricsOperatingCreate func(ctx context.Context, in *MetricsOperatingCreateReq) (*MetricsOperatingCreateResp, error)
|
||||
MetricsOperatingStatus func(ctx context.Context, in *MetricsOperatingStatusReq) (*MetricsOperatingStatusResp, error)
|
||||
@ -355,12 +349,6 @@ func (c *bundleClient) OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAd
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OnlyAddValueListByOrderNo", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) ReSignTheContract(ctx context.Context, in *ReSignTheContractRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ReSignTheContract", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) {
|
||||
out := new(CreateValueAddBundleResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -511,12 +499,6 @@ func (c *bundleClient) ConfirmWork(ctx context.Context, in *ConfirmWorkReq, opts
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ConfirmWork", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) GetWaitConfirmWorkList(ctx context.Context, in *GetWaitConfirmWorkListReq, opts ...grpc_go.CallOption) (*GetWaitConfirmWorkListResp, common.ErrorWithAttachment) {
|
||||
out := new(GetWaitConfirmWorkListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/GetWaitConfirmWorkList", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) GetReconciliationList(ctx context.Context, in *GetReconciliationListReq, opts ...grpc_go.CallOption) (*GetReconciliationListResp, common.ErrorWithAttachment) {
|
||||
out := new(GetReconciliationListResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -673,12 +655,6 @@ func (c *bundleClient) AddHiddenTaskAssignee(ctx context.Context, in *AddHiddenT
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/AddHiddenTaskAssignee", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) CreateTaskWorkLog(ctx context.Context, in *CreateTaskWorkLogRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateTaskWorkLog", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) MetricsBusiness(ctx context.Context, in *MetricsBusinessReq, opts ...grpc_go.CallOption) (*MetricsBusinessResp, common.ErrorWithAttachment) {
|
||||
out := new(MetricsBusinessResp)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
@ -747,7 +723,6 @@ type BundleServer interface {
|
||||
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||
OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
||||
OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
||||
ReSignTheContract(context.Context, *ReSignTheContractRequest) (*CommonResponse, error)
|
||||
// 增值套餐
|
||||
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||
@ -777,7 +752,6 @@ type BundleServer interface {
|
||||
GetVedioWorkDetail(context.Context, *GetVedioWorkDetailReq) (*GetVedioeWorkDetailResp, error)
|
||||
ToBeComfirmedWorks(context.Context, *ToBeComfirmedWorksReq) (*ToBeComfirmedWorksResp, error)
|
||||
ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error)
|
||||
GetWaitConfirmWorkList(context.Context, *GetWaitConfirmWorkListReq) (*GetWaitConfirmWorkListResp, error)
|
||||
// 对账单
|
||||
GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error)
|
||||
CreateReconciliation(context.Context, *ReconciliationInfo) (*CommonResponse, error)
|
||||
@ -807,7 +781,6 @@ type BundleServer interface {
|
||||
GetPendingAssign(context.Context, *PendingAssignRequest) (*PendingAssignResponse, error)
|
||||
RevertTaskCompletionByUUIDItem(context.Context, *RevertTaskCompletionByUUIDItemRequest) (*ComResponse, error)
|
||||
AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error)
|
||||
CreateTaskWorkLog(context.Context, *CreateTaskWorkLogRequest) (*CommonResponse, error)
|
||||
// 数据指标
|
||||
MetricsBusiness(context.Context, *MetricsBusinessReq) (*MetricsBusinessResp, error)
|
||||
MetricsOperatingCreate(context.Context, *MetricsOperatingCreateReq) (*MetricsOperatingCreateResp, error)
|
||||
@ -890,9 +863,6 @@ func (UnimplementedBundleServer) OrderListByOrderNo(context.Context, *OrderInfoB
|
||||
func (UnimplementedBundleServer) OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method OnlyAddValueListByOrderNo not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) ReSignTheContract(context.Context, *ReSignTheContractRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReSignTheContract not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
|
||||
}
|
||||
@ -968,9 +938,6 @@ func (UnimplementedBundleServer) ToBeComfirmedWorks(context.Context, *ToBeComfir
|
||||
func (UnimplementedBundleServer) ConfirmWork(context.Context, *ConfirmWorkReq) (*ConfirmWorkResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ConfirmWork not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) GetWaitConfirmWorkList(context.Context, *GetWaitConfirmWorkListReq) (*GetWaitConfirmWorkListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetWaitConfirmWorkList not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) GetReconciliationList(context.Context, *GetReconciliationListReq) (*GetReconciliationListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetReconciliationList not implemented")
|
||||
}
|
||||
@ -1049,9 +1016,6 @@ func (UnimplementedBundleServer) RevertTaskCompletionByUUIDItem(context.Context,
|
||||
func (UnimplementedBundleServer) AddHiddenTaskAssignee(context.Context, *AddHiddenTaskAssigneeRequest) (*ComResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddHiddenTaskAssignee not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) CreateTaskWorkLog(context.Context, *CreateTaskWorkLogRequest) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateTaskWorkLog not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) MetricsBusiness(context.Context, *MetricsBusinessReq) (*MetricsBusinessResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method MetricsBusiness not implemented")
|
||||
}
|
||||
@ -1739,35 +1703,6 @@ func _Bundle_OnlyAddValueListByOrderNo_Handler(srv interface{}, ctx context.Cont
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_ReSignTheContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReSignTheContractRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("ReSignTheContract", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateValueAddBundleRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -2493,35 +2428,6 @@ func _Bundle_ConfirmWork_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_GetWaitConfirmWorkList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetWaitConfirmWorkListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("GetWaitConfirmWorkList", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_GetReconciliationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetReconciliationListReq)
|
||||
if err := dec(in); err != nil {
|
||||
@ -3276,35 +3182,6 @@ func _Bundle_AddHiddenTaskAssignee_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_CreateTaskWorkLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateTaskWorkLogRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("CreateTaskWorkLog", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_MetricsBusiness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MetricsBusinessReq)
|
||||
if err := dec(in); err != nil {
|
||||
@ -3603,10 +3480,6 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "OnlyAddValueListByOrderNo",
|
||||
Handler: _Bundle_OnlyAddValueListByOrderNo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReSignTheContract",
|
||||
Handler: _Bundle_ReSignTheContract_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateValueAddBundle",
|
||||
Handler: _Bundle_CreateValueAddBundle_Handler,
|
||||
@ -3707,10 +3580,6 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "ConfirmWork",
|
||||
Handler: _Bundle_ConfirmWork_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetWaitConfirmWorkList",
|
||||
Handler: _Bundle_GetWaitConfirmWorkList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetReconciliationList",
|
||||
Handler: _Bundle_GetReconciliationList_Handler,
|
||||
@ -3815,10 +3684,6 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
MethodName: "AddHiddenTaskAssignee",
|
||||
Handler: _Bundle_AddHiddenTaskAssignee_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateTaskWorkLog",
|
||||
Handler: _Bundle_CreateTaskWorkLog_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "MetricsBusiness",
|
||||
Handler: _Bundle_MetricsBusiness_Handler,
|
||||
|
||||
@ -47,7 +47,7 @@ func loadMysqlConn(conn string) *gorm.DB {
|
||||
// Bundle数据库的自动迁移
|
||||
err = db.AutoMigrate(
|
||||
&model.BundleProfile{},
|
||||
//&model.BundleOrderRecords{},
|
||||
// &model.BundleOrderRecords{},
|
||||
&model.ValueAddBundleProfile{},
|
||||
//&model.ValueAddBundleRecord{}
|
||||
&model.BundleProfileLang{},
|
||||
@ -106,12 +106,12 @@ func loadTaskBenchMysqlConn(conn string) *gorm.DB {
|
||||
&model.TaskManagement{},
|
||||
&model.TaskAssignRecords{},
|
||||
// &model.TaskBalance{},
|
||||
&model.TaskLog{},
|
||||
&model.TaskSyncStatus{},
|
||||
&model.TaskPendingLayout{},
|
||||
&model.TaskAssignUUIDItems{},
|
||||
// 隐藏人员人记录表
|
||||
&model.TaskAssigneeHidden{},
|
||||
&model.TaskWorkLog{},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
||||
@ -120,9 +120,3 @@ const (
|
||||
AccountService = 4 //账号数
|
||||
AvailableTimeService = 5 //可用时长
|
||||
)
|
||||
|
||||
// 套餐状态
|
||||
const (
|
||||
IsExpired = 1 //已过期
|
||||
NotExpired = 0 //未过期
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user