mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-19 19:50:06 +08:00
完善登出功能,记录日志
This commit is contained in:
parent
d5ac6e7a19
commit
4294ed2548
@ -162,7 +162,9 @@ public class SysAuthServiceImpl implements SysAuthService {
|
|||||||
public void logout(String token) {
|
public void logout(String token) {
|
||||||
// 查询用户信息
|
// 查询用户信息
|
||||||
LoginUser loginUser = userSessionService.getLoginUser(token);
|
LoginUser loginUser = userSessionService.getLoginUser(token);
|
||||||
if(loginUser == null) return;
|
if(loginUser == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 删除session
|
// 删除session
|
||||||
userSessionService.deleteUserSession(token);
|
userSessionService.deleteUserSession(token);
|
||||||
this.createLogoutLog(loginUser.getUsername(), SysLoginResultEnum.SUCCESS);
|
this.createLogoutLog(loginUser.getUsername(), SysLoginResultEnum.SUCCESS);
|
||||||
|
Loading…
Reference in New Issue
Block a user