|
|
@@ -62,9 +62,13 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
@Resource
|
|
|
private IBusLivingLayoutDayPriceService livingLayoutDayPriceService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private IBusTeamService teamService;
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public String bookingOrderSave(BookingOrderSaveDto item) {
|
|
|
+ public String bookingOrderSave(BookingOrderSaveDto item, Boolean isTeam) {
|
|
|
+ isTeam = isTeam != null && isTeam;
|
|
|
LoginUser user = TokenUtils.getAuthUser();
|
|
|
item.getOrderInfo().setCreateTime(new Date());
|
|
|
item.getOrderInfo().setCreateUser(user.getId());
|
|
|
@@ -195,6 +199,15 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
|
|
|
// 处理预定每天的房型价格 End
|
|
|
|
|
|
+ //<editor-fold msg="团队标志">
|
|
|
+ if(isTeam) {
|
|
|
+ BusTeam team = new BusTeam();
|
|
|
+ team.setBookingOrderId(bookingId);
|
|
|
+ team.setIsDelete(0);
|
|
|
+ teamService.save(team);
|
|
|
+ }
|
|
|
+ //</editor-fold>
|
|
|
+
|
|
|
return item.getOrderInfo().getBookingOrdersNo();
|
|
|
// 团队预定
|
|
|
} else if(item.getOrderInfo().getBookingOrdersType().equals(BookingOrdersType.TEAM.getKey())) {
|
|
|
@@ -323,6 +336,10 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
});
|
|
|
result.setLivingRoomIds(livingRooms);
|
|
|
//</editor-fold>
|
|
|
+ BusTeam team = teamService.getOne(Wrappers.<BusTeam>query().eq("booking_order_id",orderId));
|
|
|
+ if(team != null) {
|
|
|
+ result.setTeamTag(team.getId());
|
|
|
+ }
|
|
|
} else if(orderInfo.getBookingOrdersType().equals(BookingOrdersType.TEAM.getKey())) {
|
|
|
List<BusBookingBatch> batches = bookingBatchService.list(Wrappers.<BusBookingBatch>query().eq("booking_orders_id",orderId));
|
|
|
List<BookingBatchRoomsVo> batchesVo = new ArrayList<>();
|
|
|
@@ -841,8 +858,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public String customerLiving(BookingOrderSaveDto livingData) {
|
|
|
- String bookingOrderNo = bookingOrderSave(livingData);
|
|
|
+ public String customerLiving(BookingOrderSaveDto livingData, Boolean isTeam) {
|
|
|
+ String bookingOrderNo = bookingOrderSave(livingData,isTeam);
|
|
|
if(bookingOrderNo != null && !bookingOrderNo.isEmpty()){
|
|
|
BookingOrderEditVo bookingOrderVo = getBookingInfoById(null,bookingOrderNo);
|
|
|
// 散客取roomIds
|