修改个人信息,密码后redis中登录信息不会过期问题

This commit is contained in:
RuoYi 2020-03-07 10:19:04 +08:00
parent 09a3a971ff
commit 166d5ec55f
2 changed files with 5 additions and 6 deletions

View File

@ -51,16 +51,16 @@ public class SysPermissionService
*/ */
public Set<String> getMenuPermission(SysUser user) public Set<String> getMenuPermission(SysUser user)
{ {
Set<String> roles = new HashSet<String>(); Set<String> perms = new HashSet<String>();
// 管理员拥有所有权限 // 管理员拥有所有权限
if (user.isAdmin()) if (user.isAdmin())
{ {
roles.add("*:*:*"); perms.add("*:*:*");
} }
else else
{ {
roles.addAll(menuService.selectMenuPermsByUserId(user.getUserId())); perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId()));
} }
return roles; return perms;
} }
} }

View File

@ -77,8 +77,7 @@ public class TokenService
{ {
if (StringUtils.isNotNull(loginUser) && StringUtils.isNotEmpty(loginUser.getToken())) if (StringUtils.isNotNull(loginUser) && StringUtils.isNotEmpty(loginUser.getToken()))
{ {
String userKey = getTokenKey(loginUser.getToken()); refreshToken(loginUser);
redisCache.setCacheObject(userKey, loginUser);
} }
} }