|
@@ -254,10 +254,12 @@ func AddLevel(c *gin.Context) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 2. 创建任务信息 |
|
|
// 2. 创建任务信息 |
|
|
err = svc.BatchAddLevelTask(session, req.UserLevelTasks, id) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
if len(req.UserLevelTasks) > 0 { |
|
|
|
|
|
err = svc.BatchAddLevelTask(session, req.UserLevelTasks, id) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
err = session.Commit() |
|
|
err = session.Commit() |
|
|