Commit 6b5cbc00ab3d0aa09bcffdc72c63a7ae6a246820
1 parent
85c299d7
feat: 优化缓存获取方式
Showing
1 changed file
with
3 additions
and
2 deletions
ruoyi-admin/src/main/java/com/ruoyi/common/cache/SchedulingCache.java
| ... | ... | @@ -186,10 +186,11 @@ public class SchedulingCache { |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | public List<ResponseSchedulingDto> getCacheSchedulingMapValueByHKey(String key, String HKey) { |
| 189 | - if (Objects.isNull(cacheScheduling.get(key))) { | |
| 189 | + Map<String, List<ResponseSchedulingDto>> map = cacheScheduling.get(key); | |
| 190 | + if (Objects.isNull(map)) { | |
| 190 | 191 | return null; |
| 191 | 192 | } |
| 192 | - List<ResponseSchedulingDto> list = cacheScheduling.get(key).get(HKey); | |
| 193 | + List<ResponseSchedulingDto> list = map.get(HKey); | |
| 193 | 194 | |
| 194 | 195 | return Objects.isNull(list) ? null : list; |
| 195 | 196 | } | ... | ... |