Issues635 (#751)

* issues/635

* issues/635

Co-authored-by: asdc <asdc>
pull/753/head
xiaoyong 2022-07-03 22:25:49 +08:00 committed by GitHub
parent 20f2c6362e
commit 64a3ff7b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -43,7 +43,7 @@ public class DataServiceImpl implements DataService {
private final DeptService deptService;
/**
*
*
* @param user /
* @return /
*/

View File

@ -119,6 +119,10 @@ public class UserServiceImpl implements UserService {
redisUtils.del(CacheKey.MENU_USER + resources.getId());
redisUtils.del(CacheKey.ROLE_AUTH + resources.getId());
}
// 修改部门会影响 数据权限
if (!Objects.equals(resources.getDept(),user.getDept())) {
redisUtils.del(CacheKey.DATA_USER + resources.getId());
}
// 如果用户被禁用,则清除用户登录信息
if(!resources.getEnabled()){
onlineUserService.kickOutForUsername(resources.getUsername());