Commit ce3d9884 by 吕明尚

修改套餐问题

parent e1557ee0
......@@ -8,6 +8,7 @@ import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.util.CollectionUtils;
import share.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -114,6 +115,9 @@ public class RoomPackServiceImpl extends ServiceImpl<RoomPackMapper, SRoomPack>
queryWrapper.eq(SRoomPack::getPackId, id);
List<SRoomPack> sRoomPackList = baseMapper.selectList(queryWrapper);
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));
sRoomPackList.forEach(item -> {
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