|
@@ -155,10 +155,13 @@ public class SysRoleController extends BaseController
|
|
{
|
|
{
|
|
return error("新增角色'" + sysRole.getRoleName() + "'失败,角色名称已存在");
|
|
return error("新增角色'" + sysRole.getRoleName() + "'失败,角色名称已存在");
|
|
}
|
|
}
|
|
|
|
+ if(org.apache.commons.lang3.StringUtils.isBlank(sysRole.getRoleKey())){
|
|
|
|
+ sysRole.setRoleKey("common");
|
|
|
|
+ }
|
|
sysRole.setCreateBy(getUsername());
|
|
sysRole.setCreateBy(getUsername());
|
|
return toAjax(roleService.addRole(sysRole));
|
|
return toAjax(roleService.addRole(sysRole));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@PreAuthorize("@ss.hasPermi('system:role:addDistribution')")
|
|
@PreAuthorize("@ss.hasPermi('system:role:addDistribution')")
|
|
@PostMapping("/saveDistributionModule")
|
|
@PostMapping("/saveDistributionModule")
|
|
@ApiOperation("新增分配模块")
|
|
@ApiOperation("新增分配模块")
|
|
@@ -223,7 +226,7 @@ public class SysRoleController extends BaseController
|
|
role.setUpdateBy(getUsername());
|
|
role.setUpdateBy(getUsername());
|
|
|
|
|
|
return toAjax(roleService.updateRoles(role));
|
|
return toAjax(roleService.updateRoles(role));
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -239,7 +242,7 @@ public class SysRoleController extends BaseController
|
|
roleService.checkRoleDataScope(role.getRoleId());
|
|
roleService.checkRoleDataScope(role.getRoleId());
|
|
return toAjax(roleService.authDataScope(role));
|
|
return toAjax(roleService.authDataScope(role));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
@PreAuthorize("@ss.hasPermi('system:role:editDistribution')")
|
|
@PreAuthorize("@ss.hasPermi('system:role:editDistribution')")
|
|
@PostMapping("/updateDistributionModule")
|
|
@PostMapping("/updateDistributionModule")
|
|
@ApiOperation("修改分配模块")
|
|
@ApiOperation("修改分配模块")
|