Commit b70024487a764c94814beca3f256995d96b34671
1 parent
2e2882b0
RedisCache的getCacheSet方法会移除元素的bug
Showing
2 changed files
with
2 additions
and
6 deletions
ruoyi/src/main/java/com/ruoyi/framework/redis/RedisCache.java
| @@ -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 |
ruoyi/src/main/java/com/ruoyi/framework/security/service/PermissionService.java
| @@ -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 | */ |