diff --git a/ruoyi/src/main/java/com/ruoyi/framework/security/service/SysPermissionService.java b/ruoyi/src/main/java/com/ruoyi/framework/security/service/SysPermissionService.java index 1bdb667f0..021e9a5b6 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/security/service/SysPermissionService.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/security/service/SysPermissionService.java @@ -51,16 +51,16 @@ public class SysPermissionService */ public Set getMenuPermission(SysUser user) { - Set roles = new HashSet(); + Set perms = new HashSet(); // 管理员拥有所有权限 if (user.isAdmin()) { - roles.add("*:*:*"); + perms.add("*:*:*"); } else { - roles.addAll(menuService.selectMenuPermsByUserId(user.getUserId())); + perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId())); } - return roles; + return perms; } } diff --git a/ruoyi/src/main/java/com/ruoyi/framework/security/service/TokenService.java b/ruoyi/src/main/java/com/ruoyi/framework/security/service/TokenService.java index 3ecbc000d..7637ed88d 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/security/service/TokenService.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/security/service/TokenService.java @@ -77,8 +77,7 @@ public class TokenService { if (StringUtils.isNotNull(loginUser) && StringUtils.isNotEmpty(loginUser.getToken())) { - String userKey = getTokenKey(loginUser.getToken()); - redisCache.setCacheObject(userKey, loginUser); + refreshToken(loginUser); } }