|
@@ -193,10 +193,12 @@ func UpdateLevel(c *gin.Context) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 2.2 添加更新后的任务 |
|
|
// 2.2 添加更新后的任务 |
|
|
err = svc.BatchAddLevelTask(session, req.UserLevelTasks, utils.StrToInt(req.LevelID)) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
if len(req.UserLevelTasks) > 0 { |
|
|
|
|
|
err = svc.BatchAddLevelTask(session, req.UserLevelTasks, utils.StrToInt(req.LevelID)) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
err = session.Commit() |
|
|
err = session.Commit() |
|
|