From ab0bf3695304d83eb65fdcc59473d2f1221b4545 Mon Sep 17 00:00:00 2001 From: lzh <1625167628@qq.com> Date: Wed, 22 Oct 2025 16:13:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=BF=E7=94=A8=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/bundleExtend.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/dao/bundleExtend.go b/internal/dao/bundleExtend.go index 94dbbc6..7b4df79 100644 --- a/internal/dao/bundleExtend.go +++ b/internal/dao/bundleExtend.go @@ -379,9 +379,9 @@ func CreateBundleBalance(data model.BundleBalance) error { func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLogPo, total int64, err error) { session := app.ModuleClients.BundleDB. Table("cast_cost_log ccl"). - Select("ccl.*,cwl.cost_type"). - Joins("left join cast_work_log cwl on cwl.work_uuid = ccl.work_uuid"). - Where("cwl.work_status = 1 and cwl.deleted_at = 0 and ccl.deleted_at = 0") + Select("ccl.*,cwe.cost_type"). + Joins("left join cast_work_extra cwe on cwe.work_uuid = ccl.work_uuid"). + Where("cwe.deleted_at = 0 and ccl.deleted_at = 0") if req.WorkTitle != "" { session = session.Where("ccl.work_title like ?", "%"+req.WorkTitle+"%") } @@ -399,9 +399,9 @@ func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLogPo, to } if req.CostType != 0 { if req.CostType == 1 { - session = session.Where("cwl.cost_type = ?", req.CostType) + session = session.Where("cwe.cost_type = ?", req.CostType) } else { - session = session.Where("cwl.cost_type in ?", []int{3, 2}) + session = session.Where("cwe.cost_type in ?", []int{3, 2}) } } if req.User != "" {