修复格式问题,重构嵌套层数过深的函数

This commit is contained in:
Leonard Wang
2020-05-19 23:46:07 +08:00
parent 5e2687a742
commit b09e54c205
38 changed files with 168 additions and 173 deletions
+2 -2
View File
@@ -93,7 +93,7 @@ func DeleteAuthority(c *gin.Context) {
response.FailWithMessage(AuthorityIdVerifyErr.Error(), c)
return
}
//删除角色之前需要判断是否有用户正在使用此角色
// 删除角色之前需要判断是否有用户正在使用此角色
err := service.DeleteAuthority(&a)
if err != nil {
response.FailWithMessage(fmt.Sprintf("删除失败,%v", err), c)
@@ -127,7 +127,7 @@ func UpdateAuthority(c *gin.Context) {
if err != nil {
response.FailWithMessage(fmt.Sprintf("更新失败,%v", err), c)
} else {
response.OkWithData(resp.SysAuthorityResponse{authority}, c)
response.OkWithData(resp.SysAuthorityResponse{Authority: authority}, c)
}
}