|
@@ -5,6 +5,7 @@ import com.miaxis.common.constant.Constants;
|
|
|
import com.miaxis.common.core.domain.Response;
|
|
|
import com.miaxis.common.core.domain.ResponseEnum;
|
|
|
import com.miaxis.common.core.domain.model.LoginUser;
|
|
|
+import com.miaxis.common.core.redis.RedisCache;
|
|
|
import com.miaxis.common.utils.ServletUtils;
|
|
|
import com.miaxis.common.utils.StringUtils;
|
|
|
import com.miaxis.framework.manager.AsyncManager;
|
|
@@ -31,6 +32,8 @@ public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler
|
|
|
@Autowired
|
|
|
private TokenService tokenService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RedisCache redisCache;
|
|
|
/**
|
|
|
* 退出处理
|
|
|
*
|
|
@@ -46,6 +49,8 @@ public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler
|
|
|
String userName = loginUser.getUsername();
|
|
|
// 删除用户缓存记录
|
|
|
tokenService.delLoginUser(loginUser.getToken());
|
|
|
+ // 删除用户缓存标记
|
|
|
+ redisCache.deleteObject(loginUser.getId());
|
|
|
// 记录用户退出日志
|
|
|
AsyncManager.me().execute(AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, ResponseEnum.LOGOUT_SUCCESS.getMessage()));
|
|
|
}
|