Merge branch 'feat-hjj-MetricsManager#260226' into dev

This commit is contained in:
jiaji.H 2026-02-26 15:44:46 +08:00
commit 3aa4a75774

View File

@ -334,8 +334,8 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
newVideoUsed = videoCountInfo.VideoUsed + videoCountInfo.UnUsedVideo newVideoUsed = videoCountInfo.VideoUsed + videoCountInfo.UnUsedVideo
} else { } else {
query = app.ModuleClients.BundleDB.Model(&model.CastWork{}). query = app.ModuleClients.BundleDB.Model(&model.CastWork{}).
Joins("LEFT JOIN cast_work_extra cwe ON cwe.work_uuid = cast_work.uuid"). Joins("LEFT JOIN cast_work_extra cwe ON cwe.work_uuid COLLATE utf8mb4_general_ci = cast_work.uuid COLLATE utf8mb4_general_ci").
Joins("left join bundle_order_records bor ON bor.uuid = cwe.bundle_order_uuid"). Joins("left join bundle_order_records bor ON bor.uuid COLLATE utf8mb4_general_ci = cwe.bundle_order_uuid COLLATE utf8mb4_general_ci").
Where("cast_work.work_category = 2"). Where("cast_work.work_category = 2").
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00"). Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
Where("cast_work.submit_time <= ?", req.End+" 23:59:59"). Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
@ -473,8 +473,8 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
newImageUsed = imageCountInfo.ImageUsed + imageCountInfo.UnUsedImage newImageUsed = imageCountInfo.ImageUsed + imageCountInfo.UnUsedImage
} else { } else {
query = app.ModuleClients.BundleDB.Model(&model.CastWork{}). query = app.ModuleClients.BundleDB.Model(&model.CastWork{}).
Joins("LEFT JOIN cast_work_extra cwe ON cwe.work_uuid = cast_work.uuid"). Joins("LEFT JOIN cast_work_extra cwe ON cwe.work_uuid COLLATE utf8mb4_general_ci = cast_work.uuid COLLATE utf8mb4_general_ci").
Joins("left join bundle_order_records bor ON bor.uuid = cwe.bundle_order_uuid"). Joins("left join bundle_order_records bor ON bor.uuid COLLATE utf8mb4_general_ci = cwe.bundle_order_uuid COLLATE utf8mb4_general_ci").
Where("cast_work.work_category = 1"). Where("cast_work.work_category = 1").
Where("cast_work.submit_time >= ?", req.Start+" 00:00:00"). Where("cast_work.submit_time >= ?", req.Start+" 00:00:00").
Where("cast_work.submit_time <= ?", req.End+" 23:59:59"). Where("cast_work.submit_time <= ?", req.End+" 23:59:59").
@ -551,8 +551,8 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
newDataAnalysisUsed = dataAnalysisCountInfo.DataAnalysisUsed + dataAnalysisCountInfo.UnUsedDataAnalysis newDataAnalysisUsed = dataAnalysisCountInfo.DataAnalysisUsed + dataAnalysisCountInfo.UnUsedDataAnalysis
} else { } else {
query = app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa"). query = app.ModuleClients.BundleDB.Table("cast_work_analysis as cwa").
Joins("LEFT JOIN cast_work_analysis_extra cwae ON cwae.analysis_uuid = cwa.uuid"). Joins("LEFT JOIN cast_work_analysis_extra cwae ON cwae.analysis_uuid COLLATE utf8mb4_general_ci = cwa.uuid COLLATE utf8mb4_general_ci").
Joins("left join bundle_order_records bor ON bor.uuid = cwae.bundle_order_uuid"). Joins("left join bundle_order_records bor ON bor.uuid COLLATE utf8mb4_general_ci = cwae.bundle_order_uuid COLLATE utf8mb4_general_ci").
Where("cwa.submit_time >= ?", req.Start+" 00:00:00"). Where("cwa.submit_time >= ?", req.Start+" 00:00:00").
Where("cwa.submit_time <= ?", req.End+" 23:59:59"). Where("cwa.submit_time <= ?", req.End+" 23:59:59").
Where("cwa.deleted_at = 0 and bor.deleted_at IS NULL and cwae.deleted_at = 0"). Where("cwa.deleted_at = 0 and bor.deleted_at IS NULL and cwae.deleted_at = 0").
@ -621,8 +621,8 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
newConpetitiveUsed = conpetitiveCountInfo.ConpetitiveUsed + conpetitiveCountInfo.UnUsedConpetitive newConpetitiveUsed = conpetitiveCountInfo.ConpetitiveUsed + conpetitiveCountInfo.UnUsedConpetitive
} else { } else {
query = app.ModuleClients.BundleDB.Table("cast_competitive_report as ccr"). query = app.ModuleClients.BundleDB.Table("cast_competitive_report as ccr").
Joins("LEFT JOIN cast_competitive_report_extra ccrpe ON ccrpe.report_uuid = ccr.uuid"). Joins("LEFT JOIN cast_competitive_report_extra ccrpe ON ccrpe.report_uuid COLLATE utf8mb4_general_ci = ccr.uuid COLLATE utf8mb4_general_ci").
Joins("left join bundle_order_records bor ON bor.uuid = ccrpe.bundle_order_uuid"). Joins("left join bundle_order_records bor ON bor.uuid COLLATE utf8mb4_general_ci = ccrpe.bundle_order_uuid COLLATE utf8mb4_general_ci").
Where("ccr.submit_time >= ?", req.Start+" 00:00:00"). Where("ccr.submit_time >= ?", req.Start+" 00:00:00").
Where("ccr.submit_time <= ?", req.End+" 23:59:59"). Where("ccr.submit_time <= ?", req.End+" 23:59:59").
Where("ccr.deleted_at = 0 and bor.deleted_at IS NULL and ccrpe.deleted_at = 0"). Where("ccr.deleted_at = 0 and bor.deleted_at IS NULL and ccrpe.deleted_at = 0").