fix: 调度任务更新状态导致数据值丢失

This commit is contained in:
TsMask
2024-01-09 16:37:27 +08:00
parent 09de2a41d0
commit f439d6b708
3 changed files with 4 additions and 30 deletions

View File

@@ -244,8 +244,8 @@ func (s *SysJobController) Status(c *gin.Context) {
// 更新状态
job.Status = body.Status
job.UpdateBy = ctx.LoginUserToUserName(c)
ok := s.sysJobService.ChangeStatus(job)
if ok {
rows := s.sysJobService.UpdateJob(job)
if rows > 0 {
c.JSON(200, result.Ok(nil))
return
}