|
@@ -25,12 +25,8 @@ import org.jeecg.config.ApiVersion;
|
|
|
import org.jeecg.config.ApiVersionConstant;
|
|
import org.jeecg.config.ApiVersionConstant;
|
|
|
import org.jeecg.config.WebConfig;
|
|
import org.jeecg.config.WebConfig;
|
|
|
import org.jeecg.modules.business.dto.BookingOrderSaveDto;
|
|
import org.jeecg.modules.business.dto.BookingOrderSaveDto;
|
|
|
-import org.jeecg.modules.business.entity.BusHotel;
|
|
|
|
|
-import org.jeecg.modules.business.entity.BusMarketCouponsCashUsed;
|
|
|
|
|
-import org.jeecg.modules.business.entity.BusMemberCard;
|
|
|
|
|
-import org.jeecg.modules.business.service.IBusHotelService;
|
|
|
|
|
-import org.jeecg.modules.business.service.IBusMemberCardService;
|
|
|
|
|
-import org.jeecg.modules.business.service.IBusRoomBookingOrdersService;
|
|
|
|
|
|
|
+import org.jeecg.modules.business.entity.*;
|
|
|
|
|
+import org.jeecg.modules.business.service.*;
|
|
|
import org.jeecg.modules.business.util.MapUtil;
|
|
import org.jeecg.modules.business.util.MapUtil;
|
|
|
import org.jeecg.modules.business.vo.KeLiItemVo;
|
|
import org.jeecg.modules.business.vo.KeLiItemVo;
|
|
|
import org.jeecg.modules.order.entity.CesOrderComment;
|
|
import org.jeecg.modules.order.entity.CesOrderComment;
|
|
@@ -38,6 +34,7 @@ import org.jeecg.modules.order.service.impl.CesOrderCommentServiceImpl;
|
|
|
import org.jeecg.modules.rooms.DTO.CanUseRequestParamDto;
|
|
import org.jeecg.modules.rooms.DTO.CanUseRequestParamDto;
|
|
|
import org.jeecg.modules.rooms.Vo.CanUseResultVo;
|
|
import org.jeecg.modules.rooms.Vo.CanUseResultVo;
|
|
|
import org.jeecg.modules.rooms.entity.CesRoomLayout;
|
|
import org.jeecg.modules.rooms.entity.CesRoomLayout;
|
|
|
|
|
+import org.jeecg.modules.rooms.entity.CesRooms;
|
|
|
import org.jeecg.modules.rooms.service.CesRoomLayoutPriceServiceImpl;
|
|
import org.jeecg.modules.rooms.service.CesRoomLayoutPriceServiceImpl;
|
|
|
import org.jeecg.modules.rooms.service.CesRoomLayoutServiceImpl;
|
|
import org.jeecg.modules.rooms.service.CesRoomLayoutServiceImpl;
|
|
|
import org.jeecg.modules.rooms.service.CesRoomsServiceImpl;
|
|
import org.jeecg.modules.rooms.service.CesRoomsServiceImpl;
|
|
@@ -76,7 +73,10 @@ public class HotelController extends WebConfig {
|
|
|
private IBusRoomBookingOrdersService busRoomBookingOrdersService;
|
|
private IBusRoomBookingOrdersService busRoomBookingOrdersService;
|
|
|
@Resource
|
|
@Resource
|
|
|
private IBusMemberCardService busMemberCardService;
|
|
private IBusMemberCardService busMemberCardService;
|
|
|
-
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private IBusRoomsLivingOrderService busRoomsLivingOrderService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private IBusBookingRoomsService busBookingRoomsService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 酒店列表查询
|
|
* 酒店列表查询
|
|
@@ -218,8 +218,10 @@ public class HotelController extends WebConfig {
|
|
|
* @param bookingStatus 1 预定中 2 在住 3 已取消
|
|
* @param bookingStatus 1 预定中 2 在住 3 已取消
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation(value="酒店预定订单-客历", notes="酒店预定订单-客历")
|
|
|
|
|
|
|
+ @ApiOperation(value="预定/入住订单列表", notes="预定/入住订单列表")
|
|
|
@RequestMapping(value = "/kedan-orders",method = RequestMethod.GET)
|
|
@RequestMapping(value = "/kedan-orders",method = RequestMethod.GET)
|
|
|
|
|
+ @ApiLogin
|
|
|
|
|
+ @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
|
public Result<IPage<KeLiItemVo>> keli(Page<KeLiItemVo> page,String keyw, Integer livingStatus, String hotelId, Integer type, Integer bookingStatus) {
|
|
public Result<IPage<KeLiItemVo>> keli(Page<KeLiItemVo> page,String keyw, Integer livingStatus, String hotelId, Integer type, Integer bookingStatus) {
|
|
|
if (type == null) throw new JeecgBootException("参数错误");
|
|
if (type == null) throw new JeecgBootException("参数错误");
|
|
|
if (type == 1 && livingStatus == null) throw new JeecgBootException("参数错误");
|
|
if (type == 1 && livingStatus == null) throw new JeecgBootException("参数错误");
|
|
@@ -231,4 +233,34 @@ public class HotelController extends WebConfig {
|
|
|
return Result.OK(busRoomBookingOrdersService.getBookingOrderKL(bookingStatus, keyw, hotelId, userId, page));
|
|
return Result.OK(busRoomBookingOrdersService.getBookingOrderKL(bookingStatus, keyw, hotelId, userId, page));
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询已入住酒店信息
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation(value = "查询已入住酒店信息", notes = "查询已入住酒店信息")
|
|
|
|
|
+ @GetMapping(value = "/living-hotel-info")
|
|
|
|
|
+ @ApiLogin
|
|
|
|
|
+ @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
|
|
|
+ public Result<BusHotel> getLivingInfo() {
|
|
|
|
|
+ BusHotel busHotel = null;
|
|
|
|
|
+ String tenantId = TenantContextHolder.getTenantId();
|
|
|
|
|
+ String userId = ThirdSessionHolder.getUserId();
|
|
|
|
|
+ LambdaQueryWrapper<BusRoomsLivingOrder> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+ lambdaQueryWrapper.eq(BusRoomsLivingOrder::getThirdLoginUserId, userId).orderByDesc(BusRoomsLivingOrder::getCreateTime).last("limit 1");
|
|
|
|
|
+ BusRoomsLivingOrder busRoomsLivingOrder = busRoomsLivingOrderService.getOne(lambdaQueryWrapper);
|
|
|
|
|
+ if (busRoomsLivingOrder != null && StringUtils.isNotBlank(busRoomsLivingOrder.getBookingOrderId())) {
|
|
|
|
|
+ LambdaQueryWrapper<BusBookingRooms> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
|
|
+ lambdaQueryWrapper1.eq(BusBookingRooms::getBookingOrdersId, busRoomsLivingOrder.getBookingOrderId()).last("limit 1");
|
|
|
|
|
+ BusBookingRooms bookingRooms = busBookingRoomsService.getOne(lambdaQueryWrapper1);
|
|
|
|
|
+ if (bookingRooms != null) {
|
|
|
|
|
+ CesRooms cesRooms = cesRoomsService.getById(bookingRooms.getRoomId());
|
|
|
|
|
+ if (cesRooms != null) {
|
|
|
|
|
+ busHotel = busHotelService.getById(cesRooms.getHotelId());
|
|
|
|
|
+ busHotel.setRoomName(cesRooms.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return Result.ok(busHotel);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|