|
|
@@ -294,6 +294,9 @@ public class HotelController extends WebConfig {
|
|
|
if (ObjectUtils.isEmpty(coupons)) {
|
|
|
return Result.error("优惠券活动不存在");
|
|
|
}
|
|
|
+ busMarketCouponsCashUsed.setStatus(2);
|
|
|
+ busMarketCouponsCashUsed.setUsedTime(DateTime.now());
|
|
|
+ busMarketCouponsCashUsedService.updateById(busMarketCouponsCashUsed);
|
|
|
couponMoney = coupons.getCost();
|
|
|
}
|
|
|
mallHotelOrder.setTenantId(tenantId);
|
|
|
@@ -312,11 +315,11 @@ public class HotelController extends WebConfig {
|
|
|
busRoomBookingOrders.setPhone(mallHotelOrder.getMobile());
|
|
|
|
|
|
List<BusBookingLayoutDayPrice> layoutDayPrices = new ArrayList<>();
|
|
|
- long getTime = mallHotelOrder.getStartDate().getTime() - mallHotelOrder.getEndDate().getTime();
|
|
|
+ long getTime = mallHotelOrder.getEndDate().getTime() - mallHotelOrder.getStartDate().getTime();
|
|
|
long day = getTime / (1000 * 60 * 60 * 24);
|
|
|
Calendar calendar = new GregorianCalendar();
|
|
|
BigDecimal sCouponMoney = couponMoney;
|
|
|
- for (Integer i = 0; i <= day; i++) {
|
|
|
+ for (Integer i = 0; i < day; i++) {
|
|
|
calendar.setTime(mallHotelOrder.getStartDate());
|
|
|
calendar.add(Calendar.DATE, i);
|
|
|
|
|
|
@@ -335,8 +338,6 @@ public class HotelController extends WebConfig {
|
|
|
busRoomBookingOrders.setLayoutDayPrices(layoutDayPrices);
|
|
|
|
|
|
BusRoomBookingOrders bookingOrders = new BusRoomBookingOrders();
|
|
|
-
|
|
|
-// DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
Date four = null;
|
|
|
@@ -356,6 +357,8 @@ public class HotelController extends WebConfig {
|
|
|
bookingOrders.setBookingOrdersType(1);
|
|
|
bookingOrders.setBreakfastNum(0);
|
|
|
|
|
|
+ lambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper2.eq(BusDictItem::getHotelId, mallHotelOrder.getHotelId());
|
|
|
lambdaQueryWrapper2.eq(BusDictItem::getDictId, "1639538915239743490");
|
|
|
busDictItems = busDictItemService.list(lambdaQueryWrapper2);
|
|
|
if (ObjectUtils.isNotEmpty(busDictItems)) {
|
|
|
@@ -372,6 +375,7 @@ public class HotelController extends WebConfig {
|
|
|
bookingOrders.setWarrantType(1);
|
|
|
bookingOrders.setOuterOrdersNo(mallHotelOrder.getCode());
|
|
|
bookingOrders.setBookingStatus(3);
|
|
|
+ bookingOrders.setBookingType(mallHotelOrder.getBookingType());
|
|
|
busRoomBookingOrders.setOrderInfo(bookingOrders);
|
|
|
|
|
|
List<BookingLayoutRoomsDto> roomIds = new ArrayList<>();
|