From ed8c7a5effd0d423ce1118b680ecdca6fe732609 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 02 七月 2025 16:43:13 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.11.205:9000/r/P2022036_Service --- src/main/java/com/lf/server/service/all/PermsService.java | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/lf/server/service/all/PermsService.java b/src/main/java/com/lf/server/service/all/PermsService.java index 4b62e45..5cb1c97 100644 --- a/src/main/java/com/lf/server/service/all/PermsService.java +++ b/src/main/java/com/lf/server/service/all/PermsService.java @@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.List; import java.util.concurrent.TimeUnit; @@ -15,10 +16,10 @@ */ @Service public class PermsService implements PermsMapper { - @Autowired + @Resource PermsMapper permsMapper; - @Autowired + @Resource RedisService redisService; @Override @@ -95,17 +96,17 @@ return permsMapper.selectMenuRecursive(id, uid); } - public void clearResCache() { - redisService.clearKeys(RedisCacheKey.permsResKey("")); - } - + /** + * 娓呴櫎鎺堟潈缂撳瓨 + */ public void clearPermsCache() { - redisService.clearKeys(RedisCacheKey.permsMenusKey("")); - redisService.clearKeys(RedisCacheKey.permsPermsKey("")); - redisService.clearKeys(RedisCacheKey.permsPermsEntityKey("")); + redisService.clearKeys(RedisCacheKey.permsRootKey()); } + /** + * 娓呴櫎鎵�鏈夌紦瀛� + */ public void clearAllCache() { - redisService.clearKeys(RedisCacheKey.permsRootKey()); + redisService.clearAll(); } } -- Gitblit v1.9.3