管道基础大数据平台系统开发-【后端】-Server
13693261870
2023-08-28 d565e050f3188fc729cb8178be7d5cc04844ce0d
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
@@ -99,13 +100,17 @@
        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();
    }
}