diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java index 086c4d6..a750adb 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/role/impl/SysRoleServiceImpl.java @@ -130,8 +130,11 @@ public class SysRoleServiceImpl extends ServiceImpl impl public List getPermissionList(JSONObject userDto) { List permission = new LinkedList<>(); // 查看是否为管理员 - permission.add("admin"); - permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("userId"))); + String username = userDto.getString("username"); + if("admin".equals(username)){ + permission.add("admin"); + } + permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("user_id"))); return permission; }