mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
修改个人信息,密码后redis中登录信息不会过期问题
This commit is contained in:
parent
09a3a971ff
commit
166d5ec55f
@ -51,16 +51,16 @@ public class SysPermissionService
|
||||
*/
|
||||
public Set<String> getMenuPermission(SysUser user)
|
||||
{
|
||||
Set<String> roles = new HashSet<String>();
|
||||
Set<String> perms = new HashSet<String>();
|
||||
// 管理员拥有所有权限
|
||||
if (user.isAdmin())
|
||||
{
|
||||
roles.add("*:*:*");
|
||||
perms.add("*:*:*");
|
||||
}
|
||||
else
|
||||
{
|
||||
roles.addAll(menuService.selectMenuPermsByUserId(user.getUserId()));
|
||||
perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId()));
|
||||
}
|
||||
return roles;
|
||||
return perms;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user