mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-09 04:03:51 +08:00
v3.27.0 【优化】员工缓存;【优化】代码生成;【优化】redis缓存失效时间
This commit is contained in:
@@ -153,8 +153,19 @@ public class LoginManager {
|
||||
}
|
||||
|
||||
|
||||
@CacheEvict(value = {AdminCacheConst.Login.USER_PERMISSION, AdminCacheConst.Login.REQUEST_EMPLOYEE}, allEntries = true)
|
||||
public void clear(){
|
||||
/**
|
||||
* 清除用户权限
|
||||
*/
|
||||
@CacheEvict(value = AdminCacheConst.Login.USER_PERMISSION)
|
||||
public void clearUserPermission(Long employeeId) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除用户登录信息
|
||||
*/
|
||||
@CacheEvict(value = AdminCacheConst.Login.REQUEST_EMPLOYEE)
|
||||
public void clearUserLoginInfo(Long employeeId) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -319,8 +319,8 @@ public class LoginService implements StpInterface {
|
||||
// sa token 登出
|
||||
StpUtil.logout();
|
||||
|
||||
// 清空登录信息缓存
|
||||
loginManager.clear();
|
||||
// 清除用户登录信息缓存和权限信息
|
||||
this.clearLoginEmployeeCache(requestUser.getUserId());
|
||||
|
||||
//保存登出日志
|
||||
LoginLogEntity loginEntity = LoginLogEntity.builder()
|
||||
@@ -476,6 +476,7 @@ public class LoginService implements StpInterface {
|
||||
}
|
||||
|
||||
public void clearLoginEmployeeCache(Long employeeId) {
|
||||
loginManager.clear();
|
||||
loginManager.clearUserPermission(employeeId);
|
||||
loginManager.clearUserLoginInfo(employeeId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user