|
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
+import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
|
@@ -118,9 +119,16 @@ public class SysRoleController extends BaseController
|
|
|
{
|
|
|
// roleService.checkRoleDataScope(roleId);
|
|
|
SysRole sysRole = roleService.selectRoleById(roleId);
|
|
|
- List<Long> rolePerms = menuService.selectMenu(sysRole.getRoleId());
|
|
|
- Long[] strArr = rolePerms.toArray(new Long[rolePerms.size()]);
|
|
|
- sysRole.setMenuIds(strArr);
|
|
|
+ if (sysRole.getRoleName().equals(("超级管理员"))){
|
|
|
+ List<SysRole> list = roleService.list();
|
|
|
+ List<Long> collect = list.stream().map(SysRole::getRoleId).collect(Collectors.toList());
|
|
|
+ Long[] strArr = collect.toArray(new Long[collect.size()]);
|
|
|
+ sysRole.setMenuIds(strArr);
|
|
|
+ }else {
|
|
|
+ List<Long> rolePerms = menuService.selectMenu(sysRole.getRoleId());
|
|
|
+ Long[] strArr = rolePerms.toArray(new Long[rolePerms.size()]);
|
|
|
+ sysRole.setMenuIds(strArr);
|
|
|
+ }
|
|
|
return success(sysRole);
|
|
|
}
|
|
|
|