refactor🎨:更新角色模块

This commit is contained in:
wenjianzhang
2021-06-15 19:03:37 +08:00
parent 13f09d6059
commit 5afe67bd1b
8 changed files with 286 additions and 270 deletions
+3 -3
View File
@@ -232,7 +232,7 @@ func (e SysRole) Update2Status(c *gin.Context) {
Errors
if err != nil {
e.Logger.Error(err)
e.Error(500, err, fmt.Sprintf("更新角色状态失败,失败原因:%s ", err.Error()))
e.Error(500, err, fmt.Sprintf("更新角色状态失败,失败原因:%s ", err.Error()))
return
}
req.SetUpdateBy(user.GetUserId(c))
@@ -273,10 +273,10 @@ func (e SysRole) Update2DataScope(c *gin.Context) {
DeptIds: req.DeptIds,
}
data.UpdateBy = user.GetUserId(c)
err = s.UpdateDataScope(data)
err = s.UpdateDataScope(&req).Error
if err != nil {
e.Error(http.StatusInternalServerError, err, "")
return
}
e.OK(nil, "操作成功")
}
}