过滤软删除

This commit is contained in:
lzh 2025-10-10 17:11:55 +08:00
parent f0dbb9c9be
commit 6cded5543f

View File

@ -223,7 +223,7 @@ func GetUsedRecord(req *bundle.GetUsedRecordListReq) (data []model.CostLogPo, to
Table("cast_cost_log ccl"). Table("cast_cost_log ccl").
Select("ccl.*,cwl.cost_type"). Select("ccl.*,cwl.cost_type").
Joins("left join cast_work_log cwl on cwl.work_uuid = ccl.work_uuid"). Joins("left join cast_work_log cwl on cwl.work_uuid = ccl.work_uuid").
Where("cwl.work_status = 1") Where("cwl.work_status = 1 and cwl.deleted_at = 0 and ccl.deleted_at = 0")
if req.WorkTitle != "" { if req.WorkTitle != "" {
session = session.Where("ccl.work_title like ?", "%"+req.WorkTitle+"%") session = session.Where("ccl.work_title like ?", "%"+req.WorkTitle+"%")
} }