TASK:免登录;
This commit is contained in:
@@ -627,6 +627,11 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
// 如果存在用户,将将被注销的用户的浏览器标识更新为用户名编号最大的用户的浏览器标识
|
||||
if (!accounts.isEmpty()) {
|
||||
Account userToBeUpdate = accounts.get(0);
|
||||
//jwt本身失效比较难做 统一用缓存实现 删除缓存就失效
|
||||
String token = LocalCacheUtils.getTokenCache(String.valueOf(accountDelete.getId()));
|
||||
if (StringUtils.isNotBlank(token)) {
|
||||
LocalCacheUtils.delTokenCache(String.valueOf(accountDelete.getId()));
|
||||
}
|
||||
if (!userName.equals(userToBeUpdate.getUserName())) {
|
||||
accountMapper.deleteById(accountDelete);
|
||||
userToBeUpdate.setUserName(userName);
|
||||
|
||||
Reference in New Issue
Block a user