|
@@ -1216,9 +1216,13 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Boolean setLivingOrderFee(List<BusOrderFee> fees, String livingOrderId) {
|
|
public Boolean setLivingOrderFee(List<BusOrderFee> fees, String livingOrderId) {
|
|
|
if(fees == null || fees.size() == 0) throw new JeecgBootException("参数无效");
|
|
if(fees == null || fees.size() == 0) throw new JeecgBootException("参数无效");
|
|
|
|
|
+ BusRoomsLivingOrder livingOrder = roomsLivingOrderService.getById(livingOrderId);
|
|
|
|
|
+ if(livingOrder == null) throw new JeecgBootException("订单不存在");
|
|
|
|
|
+ BusBookingRooms bookingRoom = bookingRoomsService.getById(livingOrder.getBookingRoomId());
|
|
|
|
|
+ if(bookingRoom == null) throw new JeecgBootException("未找到房间关联");
|
|
|
fees.forEach(roomFee->{
|
|
fees.forEach(roomFee->{
|
|
|
- if(roomFee.getRoomId() == null ||roomFee.getRoomId().isEmpty()) throw new JeecgBootException("房间ID不正确");
|
|
|
|
|
roomFee.setLivingOrderId(livingOrderId);
|
|
roomFee.setLivingOrderId(livingOrderId);
|
|
|
|
|
+ roomFee.setRoomId(bookingRoom.getRoomId());
|
|
|
roomFee.setFeeType(1); // 消费
|
|
roomFee.setFeeType(1); // 消费
|
|
|
roomFee.setCreateTime(new Date());
|
|
roomFee.setCreateTime(new Date());
|
|
|
roomFee.setDayTime(new Date());
|
|
roomFee.setDayTime(new Date());
|