优化代码提升性能

使用kickOut需要重复解密,key已经解密过一次了,直接使用解密出来的token退出登录就行
pull/259/head
zhaoyidong 2020-01-20 11:28:46 +08:00 committed by GitHub
parent da006624a4
commit efddff1b00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -148,9 +148,9 @@ public class OnlineUserService {
try { try {
String token =EncryptUtils.desDecrypt(onlineUser.getKey()); String token =EncryptUtils.desDecrypt(onlineUser.getKey());
if(StringUtils.isNotBlank(igoreToken)&&!igoreToken.equals(token)){ if(StringUtils.isNotBlank(igoreToken)&&!igoreToken.equals(token)){
this.kickOut(onlineUser.getKey()); this.logout(token);
}else if(StringUtils.isBlank(igoreToken)){ }else if(StringUtils.isBlank(igoreToken)){
this.kickOut(onlineUser.getKey()); this.logout(token);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("checkUser is error",e); log.error("checkUser is error",e);