| | |
| | | List<Object> cacheList = redisService.getCacheList(CacheConstants.XP_REGION_CASCADER); |
| | | if (cacheList != null && !cacheList.isEmpty()) { |
| | | try { |
| | | return cacheList.stream() |
| | | List<RegionCascaderVO> collect = cacheList.stream() |
| | | .filter(item -> item instanceof RegionCascaderVO) |
| | | .map(item -> (RegionCascaderVO) item) |
| | | .collect(Collectors.toList()); |
| | | for (RegionCascaderVO regionCascaderVO : collect) { |
| | | List<RegionCascaderVO> children = regionCascaderVO.getChildren(); |
| | | for (RegionCascaderVO children1 : children) { |
| | | children1.setChildren(null); |
| | | } |
| | | } |
| | | return collect; |
| | | } catch (ClassCastException e) { |
| | | redisService.deleteObject(CacheConstants.XP_REGION_CASCADER); |
| | | } |