no message
Showing
1 changed file
with
7 additions
and
6 deletions
| ... | @@ -27,10 +27,7 @@ import lombok.RequiredArgsConstructor; | ... | @@ -27,10 +27,7 @@ import lombok.RequiredArgsConstructor; |
| 27 | import org.springframework.stereotype.Service; | 27 | import org.springframework.stereotype.Service; |
| 28 | 28 | ||
| 29 | import java.rmi.ServerException; | 29 | import java.rmi.ServerException; |
| 30 | import java.util.Collection; | 30 | import java.util.*; |
| 31 | import java.util.List; | ||
| 32 | import java.util.Map; | ||
| 33 | import java.util.Set; | ||
| 34 | 31 | ||
| 35 | /** | 32 | /** |
| 36 | * 套件Service业务层处理 | 33 | * 套件Service业务层处理 |
| ... | @@ -69,17 +66,21 @@ public class EntiretyServiceImpl implements IEntiretyService { | ... | @@ -69,17 +66,21 @@ public class EntiretyServiceImpl implements IEntiretyService { |
| 69 | Set<String> buildingBlockIdList = StreamUtils.toSet(list,EntiretyVo::getId); | 66 | Set<String> buildingBlockIdList = StreamUtils.toSet(list,EntiretyVo::getId); |
| 70 | List<BuildingBlockVo> buildingBlockList = getBuildingBlockService().list(language, buildingBlockIdList); | 67 | List<BuildingBlockVo> buildingBlockList = getBuildingBlockService().list(language, buildingBlockIdList); |
| 71 | for(BuildingBlockVo vo : buildingBlockList){ | 68 | for(BuildingBlockVo vo : buildingBlockList){ |
| 72 | if(StrUtil.isNotBlank(vo.getOssId())) { | 69 | if(Objects.nonNull(vo)) { |
| 70 | if (StrUtil.isNotBlank(vo.getOssId())) { | ||
| 73 | vo.setOssUrl(ossUrlService.selectUrlByIds(vo.getOssId())); | 71 | vo.setOssUrl(ossUrlService.selectUrlByIds(vo.getOssId())); |
| 74 | } | 72 | } |
| 75 | } | 73 | } |
| 74 | } | ||
| 76 | Map<String,List<BuildingBlockVo>> buildingBlockMap = StreamUtils.groupByKey(buildingBlockList,BuildingBlockVo::getEntiretyId); | 75 | Map<String,List<BuildingBlockVo>> buildingBlockMap = StreamUtils.groupByKey(buildingBlockList,BuildingBlockVo::getEntiretyId); |
| 77 | for(EntiretyVo vo:list){ | 76 | for(EntiretyVo vo:list){ |
| 78 | if(StrUtil.isNotBlank(vo.getOssId())) { | 77 | if(Objects.nonNull(vo)) { |
| 78 | if (StrUtil.isNotBlank(vo.getOssId())) { | ||
| 79 | vo.setOssUrl(ossUrlService.selectUrlByIds(vo.getOssId())); | 79 | vo.setOssUrl(ossUrlService.selectUrlByIds(vo.getOssId())); |
| 80 | } | 80 | } |
| 81 | vo.setBuildingblockList(buildingBlockMap.get(vo.getId())); | 81 | vo.setBuildingblockList(buildingBlockMap.get(vo.getId())); |
| 82 | } | 82 | } |
| 83 | } | ||
| 83 | return TableDataInfo.build(page); | 84 | return TableDataInfo.build(page); |
| 84 | } | 85 | } |
| 85 | 86 | ... | ... |
-
Please register or sign in to post a comment