|
@@ -146,7 +146,7 @@ func UpdateLevel(c *gin.Context) { |
|
|
userDb := implement.NewUserDb(db.Db) |
|
|
userDb := implement.NewUserDb(db.Db) |
|
|
has, err := userDb.UserExistByParams(map[string]interface{}{ |
|
|
has, err := userDb.UserExistByParams(map[string]interface{}{ |
|
|
"key": "level", |
|
|
"key": "level", |
|
|
"value": req.IsUse, |
|
|
|
|
|
|
|
|
"value": req.LevelID, |
|
|
}) |
|
|
}) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
|
e.OutErr(c, e.ERR_DB_ORM, err.Error()) |
|
@@ -157,7 +157,7 @@ func UpdateLevel(c *gin.Context) { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
level.LevelWeight = utils.StrToInt(req.IsUse) |
|
|
|
|
|
|
|
|
level.IsUse = utils.StrToInt(req.IsUse) |
|
|
forceColumns = append(forceColumns, "is_use") |
|
|
forceColumns = append(forceColumns, "is_use") |
|
|
} |
|
|
} |
|
|
if req.AutoUpdate == "0" || req.AutoUpdate == "1" { |
|
|
if req.AutoUpdate == "0" || req.AutoUpdate == "1" { |
|
|