Merge branch 'feat-hjj-AutoManuallyConfirmWorkTask'

This commit is contained in:
jiaji.H 2025-12-19 13:55:59 +08:00
commit e4f7529c0c

View File

@ -543,10 +543,11 @@ func GetWaitConfirmWorkList() (data []model.CastWork, err error) {
startTime := now.Add(-time.Duration(randomHours+2) * time.Hour).Format("2006-01-02 15:04:05") 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") endTime := now.Add(-time.Duration(randomHours) * time.Hour).Format("2006-01-02 15:04:05")
err = app.ModuleClients.BundleDB.Model(&model.CastWork{}). 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("deleted_at = 0"). Where("deleted_at = 0").
Where("status = ?", 4). Where("status = ?", 4).
Where("submit_time > ?", startTime). Where("cwl.update_time > ?", startTime).
Where("submit_time < ?", endTime). Where("cwl.update_time < ?", endTime).
Order("submit_time asc"). Order("submit_time asc").
Limit(5). Limit(5).
Find(&data).Error Find(&data).Error