Commit ab429f5e by YG8999

首页查询过慢,bug修复

parent 080a25ab
...@@ -233,8 +233,15 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme ...@@ -233,8 +233,15 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
roomVoList.stream().forEach(sRoomVo -> { roomVoList.stream().forEach(sRoomVo -> {
roomIds.add(sRoomVo.getId()); roomIds.add(sRoomVo.getId());
}); });
List<SRoomPack> roomPacks = roomPackMapper.selectBatchIds(roomIds);
List<Long> packIds = new ArrayList<>(); List<Long> packIds = new ArrayList<>();
LambdaQueryWrapper<SRoomPack> roomPackQueryWrapper = new LambdaQueryWrapper();
if (roomIds.size() > 0) {
roomPackQueryWrapper.in(SRoomPack::getRoomId, roomIds);
} else {
roomIds.add(0L);
roomPackQueryWrapper.in(SRoomPack::getRoomId, roomIds);
}
List<SRoomPack> roomPacks = roomPackMapper.selectList(roomPackQueryWrapper);
roomPacks.stream().forEach(sRoomPack -> { roomPacks.stream().forEach(sRoomPack -> {
packIds.add(sRoomPack.getPackId()); packIds.add(sRoomPack.getPackId());
}); });
......
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