rollback
This commit is contained in:
@@ -266,6 +266,7 @@ func AcceptJob(ctx *jxcontext.Context, jobID int) (errCode string, err error) {
|
||||
dao.Begin(db)
|
||||
dao.WrapAddIDCULEntity(jobOrder, ctx.GetUserName())
|
||||
if err = dao.CreateEntity(db, jobOrder); err != nil {
|
||||
fmt.Println("qweqweqeqweeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
|
||||
dao.Rollback(db)
|
||||
}
|
||||
//用户接受任务,任务剩余次数-1
|
||||
|
||||
Reference in New Issue
Block a user