Commit 9c6faff6 by 吕明尚

过滤门店下房间为空的门店

parent c8656813
...@@ -275,9 +275,14 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme ...@@ -275,9 +275,14 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
sRoomVo.setPackList(sPacks); sRoomVo.setPackList(sPacks);
}); });
Map<Long,List<SRoomVo>> roomVoListMap = Optional.ofNullable(roomVoList).orElse(new ArrayList<>()).stream().collect(Collectors.groupingBy(SRoomVo::getStoreId)); Map<Long,List<SRoomVo>> roomVoListMap = Optional.ofNullable(roomVoList).orElse(new ArrayList<>()).stream().collect(Collectors.groupingBy(SRoomVo::getStoreId));
voList.stream().forEach(storeVo -> { for (int i = 0; i < voList.size(); i++) {
storeVo.setRoomVoList(roomVoListMap.get(storeVo.getId())); List<SRoomVo> roomVoList1 = roomVoListMap.get(voList.get(i).getId());
}); if (CollectionUtils.isEmpty(roomVoList1)) {
voList.remove(i);
} else {
voList.get(i).setRoomVoList(roomVoList1);
}
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment