|
@ -130,8 +130,11 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl |
|
|
public List<String> getPermissionList(JSONObject userDto) { |
|
|
public List<String> getPermissionList(JSONObject userDto) { |
|
|
List<String> permission = new LinkedList<>(); |
|
|
List<String> permission = new LinkedList<>(); |
|
|
// 查看是否为管理员
|
|
|
// 查看是否为管理员
|
|
|
permission.add("admin"); |
|
|
String username = userDto.getString("username"); |
|
|
permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("userId"))); |
|
|
if("admin".equals(username)){ |
|
|
|
|
|
permission.add("admin"); |
|
|
|
|
|
} |
|
|
|
|
|
permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("user_id"))); |
|
|
return permission; |
|
|
return permission; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|