作者 RuoYi

RedisCache的getCacheSet方法会移除元素的bug

@@ -158,11 +158,7 @@ public class RedisCache @@ -158,11 +158,7 @@ public class RedisCache
158 { 158 {
159 Set<T> dataSet = new HashSet<T>(); 159 Set<T> dataSet = new HashSet<T>();
160 BoundSetOperations<String, T> operation = redisTemplate.boundSetOps(key); 160 BoundSetOperations<String, T> operation = redisTemplate.boundSetOps(key);
161 - Long size = operation.size();  
162 - for (int i = 0; i < size; i++)  
163 - {  
164 - dataSet.add(operation.pop());  
165 - } 161 + dataSet = operation.members();
166 return dataSet; 162 return dataSet;
167 } 163 }
168 164
@@ -10,7 +10,7 @@ import com.ruoyi.framework.security.LoginUser; @@ -10,7 +10,7 @@ import com.ruoyi.framework.security.LoginUser;
10 import com.ruoyi.project.system.domain.SysRole; 10 import com.ruoyi.project.system.domain.SysRole;
11 11
12 /** 12 /**
13 - * RuoYi首创 自定义权限实现,se取自SpringSecurity首字母 13 + * RuoYi首创 自定义权限实现,ss取自SpringSecurity首字母
14 * 14 *
15 * @author ruoyi 15 * @author ruoyi
16 */ 16 */