diff --git a/internal/dao/bundleExtend.go b/internal/dao/bundleExtend.go index 11e8370..bfa76fc 100644 --- a/internal/dao/bundleExtend.go +++ b/internal/dao/bundleExtend.go @@ -403,9 +403,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+"%") } @@ -423,9 +423,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 != "" {