Commit bed9c024 by 吕明尚

Merge branch 'dev' into test

parents af93e6c6 ce3d9884
...@@ -8,6 +8,7 @@ import java.util.stream.Collectors; ...@@ -8,6 +8,7 @@ import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.util.CollectionUtils;
import share.common.utils.DateUtils; import share.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -114,6 +115,9 @@ public class RoomPackServiceImpl extends ServiceImpl<RoomPackMapper, SRoomPack> ...@@ -114,6 +115,9 @@ public class RoomPackServiceImpl extends ServiceImpl<RoomPackMapper, SRoomPack>
queryWrapper.eq(SRoomPack::getPackId, id); queryWrapper.eq(SRoomPack::getPackId, id);
List<SRoomPack> sRoomPackList = baseMapper.selectList(queryWrapper); List<SRoomPack> sRoomPackList = baseMapper.selectList(queryWrapper);
List<Long> roomIds = sRoomPackList.stream().map(SRoomPack::getRoomId).collect(Collectors.toList()); List<Long> roomIds = sRoomPackList.stream().map(SRoomPack::getRoomId).collect(Collectors.toList());
if (CollectionUtils.isEmpty(roomIds)) {
return sRoomPackList;
}
List<SRoom> sRoomList = sRoomMapper.selectList(new LambdaQueryWrapper<SRoom>().in(SRoom::getId, roomIds)); List<SRoom> sRoomList = sRoomMapper.selectList(new LambdaQueryWrapper<SRoom>().in(SRoom::getId, roomIds));
sRoomPackList.forEach(item -> { sRoomPackList.forEach(item -> {
if (ObjectUtils.isNotEmpty(item.getRoomId())) { if (ObjectUtils.isNotEmpty(item.getRoomId())) {
......
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