query err

This commit is contained in:
苏尹岚
2020-10-26 14:13:43 +08:00
parent 8ad7ed8aaf
commit 1601813062

View File

@@ -186,7 +186,7 @@ func AcceptJob(ctx *jxcontext.Context, jobID int) (errCode string, err error) {
)
job := &model.Job{}
job.ID = jobID
err = dao.GetEntity(db, &job)
err = dao.GetEntity(db, job)
if job.UserID == "" || job.Status == model.JobStatusFailed || job.Status == model.JobStatusOverdue || job.FinishedAt.Sub(time.Now()) <= 0 || job.SurplusCount <= 0 || job.LimitCountType <= 0 {
return errCode, fmt.Errorf("未找到该任务或该任务状态不正常,无法接单!")
}