|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.ruoyi.auth.service;
|
|
|
|
|
|
|
|
|
|
import cn.dev33.satoken.exception.NotLoginException;
|
|
|
|
|
import cn.dev33.satoken.secure.BCrypt;
|
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
@ -79,8 +80,16 @@ public class SysLoginService {
|
|
|
|
|
return StpUtil.getTokenValue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void logout(String loginName) {
|
|
|
|
|
recordLogininfor(loginName, Constants.LOGOUT, MessageUtils.message("user.logout.success"));
|
|
|
|
|
/**
|
|
|
|
|
* 退出登录
|
|
|
|
|
*/
|
|
|
|
|
public void logout() {
|
|
|
|
|
try {
|
|
|
|
|
String username = LoginHelper.getUsername();
|
|
|
|
|
StpUtil.logout();
|
|
|
|
|
recordLogininfor(username, Constants.LOGOUT, MessageUtils.message("user.logout.success"));
|
|
|
|
|
} catch (NotLoginException e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|