From e57682aa53976b8e4da4087e394903dac8842bfd Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 08 八月 2022 15:59:22 +0800 Subject: [PATCH] 👀 发布 4.3.0-beta1 公测版 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java index c1575ae..b42248e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java @@ -1,12 +1,12 @@ package com.ruoyi.web.controller.monitor; import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.collection.CollUtil; import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.utils.JsonUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.redis.RedisUtils; +import com.ruoyi.oss.constant.OssConstant; import com.ruoyi.system.domain.SysCache; import lombok.RequiredArgsConstructor; import org.redisson.spring.data.connection.RedissonConnectionFactory; @@ -32,12 +32,13 @@ static { CACHES.add(new SysCache(CacheConstants.LOGIN_TOKEN_KEY, "鐢ㄦ埛淇℃伅")); CACHES.add(new SysCache(CacheConstants.ONLINE_TOKEN_KEY, "鍦ㄧ嚎鐢ㄦ埛")); - CACHES.add(new SysCache(CacheConstants.LOGIN_ERROR, "鐧婚檰閿欒")); CACHES.add(new SysCache(CacheConstants.SYS_CONFIG_KEY, "閰嶇疆淇℃伅")); CACHES.add(new SysCache(CacheConstants.SYS_DICT_KEY, "鏁版嵁瀛楀吀")); CACHES.add(new SysCache(CacheConstants.CAPTCHA_CODE_KEY, "楠岃瘉鐮�")); CACHES.add(new SysCache(CacheConstants.REPEAT_SUBMIT_KEY, "闃查噸鎻愪氦")); CACHES.add(new SysCache(CacheConstants.RATE_LIMIT_KEY, "闄愭祦澶勭悊")); + CACHES.add(new SysCache(OssConstant.SYS_OSS_KEY, "OSS閰嶇疆")); + CACHES.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "瀵嗙爜閿欒娆℃暟")); } /** @@ -86,9 +87,8 @@ @SaCheckPermission("monitor:cache:list") @GetMapping("/getKeys/{cacheName}") public R<Collection<String>> getCacheKeys(@PathVariable String cacheName) { - Iterable<String> iterable = RedisUtils.getClient().getKeys().getKeysByPattern(cacheName + "*"); - Collection<String> cacheKyes = CollUtil.toCollection(iterable); - return R.ok(cacheKyes); + Collection<String> cacheKeys = RedisUtils.keys(cacheName + "*"); + return R.ok(cacheKeys); } /** @@ -113,7 +113,7 @@ @SaCheckPermission("monitor:cache:list") @DeleteMapping("/clearCacheName/{cacheName}") public R<Void> clearCacheName(@PathVariable String cacheName) { - RedisUtils.getClient().getKeys().deleteByPattern(cacheName + "*"); + RedisUtils.deleteKeys(cacheName + "*"); return R.ok(); } @@ -135,7 +135,7 @@ @SaCheckPermission("monitor:cache:list") @DeleteMapping("/clearCacheAll") public R<Void> clearCacheAll() { - RedisUtils.getClient().getKeys().deleteByPattern("*"); + RedisUtils.deleteKeys("*"); return R.ok(); } -- Gitblit v1.9.3