4 Commits

Author SHA1 Message Date
疯狂的狮子Li
49c00e162b update 删除无用依赖引入 2025-07-31 11:25:07 +08:00
疯狂的狮子Li
076a0a44fa update 优化 isLogin 判断逻辑 2025-07-31 10:17:27 +08:00
疯狂的狮子Li
0d93589d99 update 优化 PlusSaTokenDao 删除key同步删除本地缓存 2025-07-31 10:11:46 +08:00
疯狂的狮子Li
54a8189e27 fix 修复 依赖漏删 2025-07-31 09:21:18 +08:00
4 changed files with 14 additions and 8 deletions

View File

@@ -74,7 +74,9 @@ public class PlusSaTokenDao implements SaTokenDaoBySessionFollowObject {
*/
@Override
public void delete(String key) {
RedisUtils.deleteObject(key);
if (RedisUtils.deleteObject(key)) {
CAFFEINE.invalidate(key);
}
}
/**
@@ -151,7 +153,9 @@ public class PlusSaTokenDao implements SaTokenDaoBySessionFollowObject {
*/
@Override
public void deleteObject(String key) {
RedisUtils.deleteObject(key);
if (RedisUtils.deleteObject(key)) {
CAFFEINE.invalidate(key);
}
}
/**

View File

@@ -207,7 +207,8 @@ public class LoginHelper {
*/
public static boolean isLogin() {
try {
return getLoginUser() != null;
StpUtil.checkLogin();
return true;
} catch (Exception e) {
return false;
}

View File

@@ -21,11 +21,6 @@
<artifactId>ruoyi-common-json</artifactId>
</dependency>
<dependency>
<groupId>org.dromara</groupId>
<artifactId>ruoyi-common-redis</artifactId>
</dependency>
<!-- SpringBoot Web容器 -->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@@ -53,6 +53,12 @@
<artifactId>velocity-engine-core</artifactId>
</dependency>
<dependency>
<groupId>org.anyline</groupId>
<artifactId>anyline-environment-spring-data-jdbc</artifactId>
<version>${anyline.version}</version>
</dependency>
<dependency>
<groupId>org.anyline</groupId>
<artifactId>anyline-data-jdbc-mysql</artifactId>