|
@@ -34,10 +34,12 @@ 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.CesRoomLayoutPrice;
|
|
|
import org.jeecg.modules.rooms.entity.CesRooms;
|
|
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;
|
|
|
|
|
+import org.jeecg.modules.rooms.service.ICesRoomLayoutPriceDateService;
|
|
|
import org.jeecg.modules.system.entity.SysTenant;
|
|
import org.jeecg.modules.system.entity.SysTenant;
|
|
|
import org.jeecg.modules.system.service.ISysTenantService;
|
|
import org.jeecg.modules.system.service.ISysTenantService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -47,6 +49,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -77,6 +80,8 @@ public class HotelController extends WebConfig {
|
|
|
private IBusRoomsLivingOrderService busRoomsLivingOrderService;
|
|
private IBusRoomsLivingOrderService busRoomsLivingOrderService;
|
|
|
@Resource
|
|
@Resource
|
|
|
private IBusBookingRoomsService busBookingRoomsService;
|
|
private IBusBookingRoomsService busBookingRoomsService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private CesRoomLayoutPriceServiceImpl cesRoomLayoutPriceService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 酒店列表查询
|
|
* 酒店列表查询
|
|
@@ -114,16 +119,17 @@ public class HotelController extends WebConfig {
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation(value = "可入住酒店列表", notes = "可入住酒店列表")
|
|
@ApiOperation(value = "可入住酒店列表", notes = "可入住酒店列表")
|
|
|
@GetMapping(value = "/can-use-hotel-list")
|
|
@GetMapping(value = "/can-use-hotel-list")
|
|
|
- @ApiLogin
|
|
|
|
|
@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
|
public Result<IPage<BusHotel>> getCanUseHotelList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
public Result<IPage<BusHotel>> getCanUseHotelList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
@RequestParam(name = "sort", defaultValue = "0") Integer sort,
|
|
@RequestParam(name = "sort", defaultValue = "0") Integer sort,
|
|
|
@RequestParam(name = "keyWord", defaultValue = "") String keyWord,
|
|
@RequestParam(name = "keyWord", defaultValue = "") String keyWord,
|
|
|
|
|
+ @RequestParam(name = "lat", defaultValue = "0") BigDecimal lat,
|
|
|
|
|
+ @RequestParam(name = "lng", defaultValue = "0") BigDecimal lng,
|
|
|
HttpServletRequest req) {
|
|
HttpServletRequest req) {
|
|
|
Page<BusHotel> page = new Page<BusHotel>(pageNo, pageSize);
|
|
Page<BusHotel> page = new Page<BusHotel>(pageNo, pageSize);
|
|
|
String tenantId = TenantContextHolder.getTenantId();
|
|
String tenantId = TenantContextHolder.getTenantId();
|
|
|
- IPage<BusHotel> pageList = busHotelService.pageList(page, tenantId, keyWord, sort);
|
|
|
|
|
|
|
+ IPage<BusHotel> pageList = busHotelService.pageList(page, tenantId, keyWord, sort, lat, lng);
|
|
|
return Result.OK(pageList);
|
|
return Result.OK(pageList);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -161,19 +167,20 @@ public class HotelController extends WebConfig {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 根据酒店查询评价列表
|
|
* 根据酒店查询评价列表
|
|
|
|
|
+ *
|
|
|
* @param cesOrderComment
|
|
* @param cesOrderComment
|
|
|
* @param pageNo
|
|
* @param pageNo
|
|
|
* @param pageSize
|
|
* @param pageSize
|
|
|
* @param req
|
|
* @param req
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation(value="根据酒店查询评价列表", notes="根据酒店查询评价列表")
|
|
|
|
|
|
|
+ @ApiOperation(value = "根据酒店查询评价列表", notes = "根据酒店查询评价列表")
|
|
|
@GetMapping(value = "/comment-list")
|
|
@GetMapping(value = "/comment-list")
|
|
|
@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
|
public Result<IPage<CesOrderComment>> getCommentPageList(CesOrderComment cesOrderComment,
|
|
public Result<IPage<CesOrderComment>> getCommentPageList(CesOrderComment cesOrderComment,
|
|
|
- @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
|
|
- @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
|
|
- HttpServletRequest req) {
|
|
|
|
|
|
|
+ @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
|
|
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
|
|
+ HttpServletRequest req) {
|
|
|
LambdaQueryWrapper<CesOrderComment> queryWrapper = QueryGenerator.initQueryWrapper(cesOrderComment, req.getParameterMap()).lambda();
|
|
LambdaQueryWrapper<CesOrderComment> queryWrapper = QueryGenerator.initQueryWrapper(cesOrderComment, req.getParameterMap()).lambda();
|
|
|
Page<CesOrderComment> page = new Page<CesOrderComment>(pageNo, pageSize);
|
|
Page<CesOrderComment> page = new Page<CesOrderComment>(pageNo, pageSize);
|
|
|
IPage<CesOrderComment> pageList = cesOrderCommentService.page(page, queryWrapper);
|
|
IPage<CesOrderComment> pageList = cesOrderCommentService.page(page, queryWrapper);
|
|
@@ -183,11 +190,12 @@ public class HotelController extends WebConfig {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 酒店预定订单添加
|
|
* 酒店预定订单添加
|
|
|
|
|
+ *
|
|
|
* @param busRoomBookingOrders
|
|
* @param busRoomBookingOrders
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@AutoLog(value = "酒店预定订单-添加")
|
|
@AutoLog(value = "酒店预定订单-添加")
|
|
|
- @ApiOperation(value="酒店预定订单-添加", notes="酒店预定订单-添加")
|
|
|
|
|
|
|
+ @ApiOperation(value = "酒店预定订单-添加", notes = "酒店预定订单-添加")
|
|
|
@PostMapping(value = "/hotel-room-booking")
|
|
@PostMapping(value = "/hotel-room-booking")
|
|
|
@ApiLogin
|
|
@ApiLogin
|
|
|
@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
@@ -213,16 +221,17 @@ public class HotelController extends WebConfig {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 预定/入住订单列表
|
|
* 预定/入住订单列表
|
|
|
- * @param type 1 入住订单查询->livingStatus | 2 bookingStatus
|
|
|
|
|
- * @param livingStatus -1 正常入住,1 已结账退房,2 先走未结,3 联房退房
|
|
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param type 1 入住订单查询->livingStatus | 2 bookingStatus
|
|
|
|
|
+ * @param livingStatus -1 正常入住,1 已结账退房,2 先走未结,3 联房退房
|
|
|
* @param bookingStatus 1 预定中 2 在住 3 已取消
|
|
* @param bookingStatus 1 预定中 2 在住 3 已取消
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- @ApiOperation(value="预定/入住订单列表", notes="预定/入住订单列表")
|
|
|
|
|
- @RequestMapping(value = "/kedan-orders",method = RequestMethod.GET)
|
|
|
|
|
|
|
+ @ApiOperation(value = "预定/入住订单列表", notes = "预定/入住订单列表")
|
|
|
|
|
+ @RequestMapping(value = "/kedan-orders", method = RequestMethod.GET)
|
|
|
@ApiLogin
|
|
@ApiLogin
|
|
|
@ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
@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("参数错误");
|
|
|
if (type == 2 && bookingStatus == null) throw new JeecgBootException("参数错误");
|
|
if (type == 2 && bookingStatus == null) throw new JeecgBootException("参数错误");
|
|
@@ -236,6 +245,7 @@ public class HotelController extends WebConfig {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询已入住酒店信息
|
|
* 查询已入住酒店信息
|
|
|
|
|
+ *
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation(value = "查询已入住酒店信息", notes = "查询已入住酒店信息")
|
|
@ApiOperation(value = "查询已入住酒店信息", notes = "查询已入住酒店信息")
|
|
@@ -263,4 +273,21 @@ public class HotelController extends WebConfig {
|
|
|
}
|
|
}
|
|
|
return Result.ok(busHotel);
|
|
return Result.ok(busHotel);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据房型查询对应房价列表
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param layoutId
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation(value = "根据房型查询对应房价列表", notes = "根据房型查询对应房价列表")
|
|
|
|
|
+ @GetMapping(value = "/room-layout-price")
|
|
|
|
|
+ @ApiVersion(group = ApiVersionConstant.FAP_MALLAPI101)
|
|
|
|
|
+ public Result<List<CesRoomLayoutPrice>> getRoomLayoutPrice(@RequestParam(name = "layoutId", required = true) String layoutId, @RequestParam(name = "type", required = true) Integer type) {
|
|
|
|
|
+ LambdaQueryWrapper<CesRoomLayoutPrice> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
+ lambdaQueryWrapper.eq(CesRoomLayoutPrice::getLayoutId, layoutId);
|
|
|
|
|
+ lambdaQueryWrapper.eq(CesRoomLayoutPrice::getType, type);
|
|
|
|
|
+ List<CesRoomLayoutPrice> list = cesRoomLayoutPriceService.list(lambdaQueryWrapper);
|
|
|
|
|
+ return Result.ok(list);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|