query err
This commit is contained in:
@@ -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("未找到该任务或该任务状态不正常,无法接单!")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user