From 81297d134f7207ac60723ab9df8ce1d075756cb9 Mon Sep 17 00:00:00 2001 From: zds <2388969634@qq.com> Date: Thu, 29 Aug 2024 17:09:16 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nl/system/service/role/impl/SysRoleServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; }