From cdd926645255f14b2dfa73e1fed6e007c9e4bd49 Mon Sep 17 00:00:00 2001 From: lcj <2331845269@qq.com> Date: Tue, 30 Sep 2025 09:37:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../satoken/core/service/SaPermissionImpl.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xinnengyuan/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/service/SaPermissionImpl.java b/xinnengyuan/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/service/SaPermissionImpl.java index ac03e595..9d47ce07 100644 --- a/xinnengyuan/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/service/SaPermissionImpl.java +++ b/xinnengyuan/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/service/SaPermissionImpl.java @@ -28,7 +28,7 @@ public class SaPermissionImpl implements StpInterface { public List getPermissionList(Object loginId, String loginType) { LoginUser loginUser = LoginHelper.getLoginUser(); UserType userType = UserType.getUserType(loginUser.getUserType()); - if (userType == UserType.SYS_USER) { + if (userType == UserType.SYS_USER || userType == UserType.APP_USER) { Long projectId = loginUser.getProjectId(); List menuPermission = loginUser.getMenuPermission(); if (CollUtil.isNotEmpty(menuPermission)) { @@ -51,9 +51,10 @@ public class SaPermissionImpl implements StpInterface { return new ArrayList<>(); } - } else if (userType == UserType.APP_USER) { - // 其他端 自行根据业务编写 } +/* else if (userType == UserType.APP_USER) { + // 其他端 自行根据业务编写 + }*/ return new ArrayList<>(); // return Collections.singletonList("*"); } @@ -65,7 +66,7 @@ public class SaPermissionImpl implements StpInterface { public List getRoleList(Object loginId, String loginType) { LoginUser loginUser = LoginHelper.getLoginUser(); UserType userType = UserType.getUserType(loginUser.getUserType()); - if (userType == UserType.SYS_USER) { + if (userType == UserType.SYS_USER || userType == UserType.APP_USER) { Long projectId = loginUser.getProjectId(); List rolePermission = loginUser.getRolePermission(); if (CollUtil.isNotEmpty(rolePermission)) { @@ -87,9 +88,10 @@ public class SaPermissionImpl implements StpInterface { } else { return new ArrayList<>(); } - } else if (userType == UserType.APP_USER) { - // 其他端 自行根据业务编写 } +/* else if (userType == UserType.APP_USER) { + // 其他端 自行根据业务编写 + }*/ return new ArrayList<>(); } }