用户管理
This commit is contained in:
parent
254e0ac233
commit
041df2aebc
@ -67,7 +67,7 @@ public class UserDetailsServiceImpl implements UserDetailsService {
|
|||||||
// emEmployees = emEmployeesService.findByUserId(user.getId());
|
// emEmployees = emEmployeesService.findByUserId(user.getId());
|
||||||
// }
|
// }
|
||||||
// 初始化JwtUserDto
|
// 初始化JwtUserDto
|
||||||
jwtUserDto = new JwtUserDto(BeanUtil.copyProperties(user, LoginUserDto.class), UserTypeEnum.getByValue(user.getUserType()),dataService.getDeptIds(user), authorities,emEmployees);
|
jwtUserDto = new JwtUserDto(BeanUtil.copyProperties(user, LoginUserDto.class), UserTypeEnum.getByValue(user.getUserType()),null, authorities,emEmployees);
|
||||||
// 添加缓存数据
|
// 添加缓存数据
|
||||||
userCacheManager.addUserCache(username, jwtUserDto);
|
userCacheManager.addUserCache(username, jwtUserDto);
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
if(!resources.getEnabled()){
|
if(!resources.getEnabled()){
|
||||||
onlineUserService.kickOutForUsername(resources.getUsername());
|
onlineUserService.kickOutForUsername(resources.getUsername());
|
||||||
}
|
}
|
||||||
user.setPassword(passwordEncoder.encode(RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,resources.getPassword())));
|
if (resources.getPassword()!=null){
|
||||||
|
user.setPassword(passwordEncoder.encode(RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,resources.getPassword())));
|
||||||
|
}
|
||||||
user.setUsername(resources.getUsername());
|
user.setUsername(resources.getUsername());
|
||||||
user.setScenicId(resources.getScenicId());
|
user.setScenicId(resources.getScenicId());
|
||||||
user.setEnabled(resources.getEnabled());
|
user.setEnabled(resources.getEnabled());
|
||||||
|
Loading…
Reference in New Issue
Block a user