refactor🎨:更新角色模块
This commit is contained in:
1 parent
13f09d6059
commit
5afe67bd1b
8 files changed
+286
-270
No files matched your search
@@ -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, "操作成功")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user