|
@@ -297,7 +297,15 @@ public class IndustryServiceImpl implements IndustryService {
|
|
|
if(ids.isEmpty()){
|
|
|
return new HashMap<>();
|
|
|
}
|
|
|
+
|
|
|
List<IndustryDO> industryDOS = industryMapper.selectBatchIds(ids);
|
|
|
+ Set<Long> industryParentIds = industryDOS.stream().map(IndustryDO::getParentId).collect(Collectors.toSet());
|
|
|
+ List<IndustryDO> industryPaerntDOS = industryMapper.selectBatchIds(industryParentIds);
|
|
|
+
|
|
|
+ Map<Long, String> parentMap = new HashMap<>();
|
|
|
+ industryPaerntDOS.forEach(item->parentMap.put(item.getId(), item.getNameCn()));
|
|
|
+
|
|
|
+
|
|
|
return industryDOS.stream().collect(Collectors.toMap(IndustryDO::getId, IndustryDO::getNameCn));
|
|
|
}
|
|
|
}
|