add 增加 RedisUtils 获取缓存Map的key列表

feature/model
疯狂的狮子li 2 years ago
parent dca5d69dd2
commit 6733e48ea1

@ -3,7 +3,6 @@ package com.ruoyi.common.utils.redis;
import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.common.utils.spring.SpringUtils;
import lombok.AccessLevel; import lombok.AccessLevel;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.apache.poi.ss.formula.functions.T;
import org.redisson.api.*; import org.redisson.api.*;
import org.redisson.config.Config; import org.redisson.config.Config;
@ -334,7 +333,7 @@ public class RedisUtils {
* @param key * @param key
* @return key * @return key
*/ */
public static Set<String> getCacheMapKeySet(final String key) { public static <T> Set<String> getCacheMapKeySet(final String key) {
RMap<String, T> rMap = CLIENT.getMap(key); RMap<String, T> rMap = CLIENT.getMap(key);
return rMap.keySet(); return rMap.keySet();
} }

Loading…
Cancel
Save