bugfix: 在没有任务 uuid 的情况下,如果找不到任务记录不报错,影响流程

This commit is contained in:
cjy 2025-10-23 11:51:17 +08:00
parent edef65a3e1
commit 5cdcf7376d

View File

@ -497,10 +497,11 @@ func UpdateTaskProgress(req *CompleteTaskRequest) error {
if err != nil {
if err == gorm.ErrRecordNotFound {
tx.Rollback()
return commonErr.ReturnError(nil, "未找到任务记录", "该员工没有符合条件的未手动完成任务记录")
return nil
}
tx.Rollback()
return commonErr.ReturnError(err, "查询指派记录失败", "查询指派记录失败: ")
fmt.Println("查找指派记录失败")
return nil
}
}