From e6940d48e3e87a798bbe017a2907c036409fa32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Sat, 2 Apr 2022 11:54:44 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=9B=B4=E5=90=8D=20SaInterfaceImpl?= =?UTF-8?q?=20=E4=B8=BA=20SaPermissionImpl=20=E5=AE=8C=E5=96=84=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...InterfaceImpl.java => SaPermissionImpl.java} | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) rename ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/service/{SaInterfaceImpl.java => SaPermissionImpl.java} (79%) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/service/SaInterfaceImpl.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/service/SaPermissionImpl.java similarity index 79% rename from ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/service/SaInterfaceImpl.java rename to ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/service/SaPermissionImpl.java index 8e97d057..057d1833 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/service/SaInterfaceImpl.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/satoken/service/SaPermissionImpl.java @@ -9,9 +9,17 @@ import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.List; +/** + * sa-token 权限管理实现类 + * + * @author Lion Li + */ @Component -public class SaInterfaceImpl implements StpInterface { +public class SaPermissionImpl implements StpInterface { + /** + * 获取菜单权限列表 + */ @Override public List getPermissionList(Object loginId, String loginType) { LoginUser loginUser = LoginHelper.getLoginUser(); @@ -19,11 +27,14 @@ public class SaInterfaceImpl implements StpInterface { if (userType == UserType.SYS_USER) { return new ArrayList<>(loginUser.getMenuPermission()); } else if (userType == UserType.APP_USER) { - // app端权限返回 自行根据业务编写 + // 其他端 自行根据业务编写 } return new ArrayList<>(); } + /** + * 获取角色权限列表 + */ @Override public List getRoleList(Object loginId, String loginType) { LoginUser loginUser = LoginHelper.getLoginUser(); @@ -31,7 +42,7 @@ public class SaInterfaceImpl implements StpInterface { if (userType == UserType.SYS_USER) { return new ArrayList<>(loginUser.getRolePermission()); } else if (userType == UserType.APP_USER) { - // app端权限返回 自行根据业务编写 + // 其他端 自行根据业务编写 } return new ArrayList<>(); }