Ver código fonte

預約入住訂單添加第三方用戶id

覃浩 2 anos atrás
pai
commit
27d012e563

+ 3 - 3
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/controller/BusRoomBookingOrdersController.java

@@ -429,12 +429,12 @@ public class BusRoomBookingOrdersController extends JeecgController<BusRoomBooki
 	  */
 	 @ApiOperation(value="酒店预定订单-客历", notes="酒店预定订单-客历")
 	 @RequestMapping(value = "/kedan-orders",method = RequestMethod.GET)
-	 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 thirdUserId, String keyw, Integer livingStatus,String hotelId,Integer type,Integer bookingStatus){
 	 	if(type == null) throw new JeecgBootException("参数错误");
 	 	if( type == 1 && livingStatus  == null ) throw new JeecgBootException("参数错误");
 	 	if(type == 2 && bookingStatus == null) throw new JeecgBootException("参数错误");
-	 	if(type == 1 ) return Result.OK(service.getLivingOrderKL(livingStatus,keyw,hotelId,page));
-	 	if(type == 2) return  Result.OK(service.getBookingOrderKL(bookingStatus,keyw,hotelId,page));
+	 	if(type == 1 ) return Result.OK(service.getLivingOrderKL(livingStatus,keyw,hotelId,thirdUserId,page));
+	 	if(type == 2) return  Result.OK(service.getBookingOrderKL(bookingStatus,keyw,hotelId,thirdUserId,page));
 	 	return  null;
 	 }
 	 /**

+ 5 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/entity/BusRoomBookingOrders.java

@@ -189,6 +189,11 @@ public class BusRoomBookingOrders implements Serializable {
     @ApiModelProperty(value = "团队类型字典ID")
     private String teamTypeDicId;
 
+    /**第三方用戶ID*/
+    @Excel(name = "第三方用戶ID", width = 15)
+    @ApiModelProperty(value = "第三方用戶ID")
+    private String thirdLoginUserId;
+
     @TableField(exist = false)
     private Boolean isTeam;
 

+ 4 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/entity/BusRoomsLivingOrder.java

@@ -216,5 +216,9 @@ public class BusRoomsLivingOrder implements Serializable {
     @Excel(name = "是否联房退房 1 是,2否", width = 15)
     @ApiModelProperty(value = "是否联房退房 1 是,2否")
     private Integer isUnionSettled;
+    /**第三方用戶ID*/
+    @Excel(name = "第三方用戶ID", width = 15)
+    @ApiModelProperty(value = "第三方用戶ID")
+    private String thirdLoginUserId;
 
 }

+ 2 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/mapper/BusRoomBookingOrdersMapper.java

@@ -36,6 +36,6 @@ public interface BusRoomBookingOrdersMapper extends BaseMapper<BusRoomBookingOrd
 
     List<RiLiFangTaiVo> getRiliFangTai(String start, String end,String hotelId);
 
-    IPage<KeLiItemVo> getKeLiLiving(IPage<KeLiItemVo> page, String hotelId,String keyw,Integer status);
-    IPage<KeLiItemVo> getKeBooking(IPage<KeLiItemVo> page, String hotelId,String keyw,Integer status);
+    IPage<KeLiItemVo> getKeLiLiving(IPage<KeLiItemVo> page,String thirdUserId, String hotelId,String keyw,Integer status);
+    IPage<KeLiItemVo> getKeBooking(IPage<KeLiItemVo> page,String thirdUserId, String hotelId,String keyw,Integer status);
 }

+ 6 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/mapper/xml/BusRoomBookingOrdersMapper.xml

@@ -238,6 +238,9 @@ lo.booking_order_id
         inner join ces_room_layout l
         on l.id = r.layout_id
         where o.hotel_id = #{hotelId}
+        <if test="thirdUserId != null and thirdUserId != ''">
+            and o.third_login_user_id = #{thirdUserId}
+        </if>
         <if test="status != 4">
             and  o.settle_type = #{status}
         </if>
@@ -286,6 +289,9 @@ lo.booking_order_id
         inner join bus_customer cus
         on cus.id = o.contact_id
         where 1 = 1
+        <if test="thirdUserId != null and thirdUserId != ''">
+            and o.third_login_user_id = #{thirdUserId}
+        </if>
         <if test="status == 1 or status == 2">
             and o.booking_status = 1
         </if>

+ 2 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/IBusRoomBookingOrdersService.java

@@ -59,8 +59,8 @@ public interface IBusRoomBookingOrdersService extends IService<BusRoomBookingOrd
     Boolean leaveNotSettle(String bookingOrderId, String livingOrderId);
 
     IPage<RoomLivingQueryVo> getLivingPageData(Integer status,String keyw, Page<RoomLivingQueryVo> page,String hotelId);
-    IPage<KeLiItemVo> getLivingOrderKL(Integer status,String keyw,String hotelId, Page<KeLiItemVo> page);
-    IPage<KeLiItemVo> getBookingOrderKL(Integer status,String keyw,String hotelId, Page<KeLiItemVo> page);
+    IPage<KeLiItemVo> getLivingOrderKL(Integer status,String keyw,String hotelId,String thirdUserId, Page<KeLiItemVo> page);
+    IPage<KeLiItemVo> getBookingOrderKL(Integer status,String keyw,String hotelId,String thirdUserId, Page<KeLiItemVo> page);
     Boolean setLivingOrderFee(List<BusOrderFee> fees,String livingOrderId,String hotelId);
     Boolean unionOrder(String roomId,String targetRoomId, String bookingOrderId, String hotelId);
     Boolean mergeOrder(String livingRoomId, List<String> livingOrderId);

+ 5 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/impl/BusRoomBookingOrdersServiceImpl.java

@@ -1286,8 +1286,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         return baseMapper.getPage(page,status,keyw,hotelId);
     }
     @Override
-    public IPage<KeLiItemVo> getLivingOrderKL(Integer status,String keyw,String hotelId, Page<KeLiItemVo> page) {
-        IPage<KeLiItemVo> pRes = baseMapper.getKeLiLiving(page,hotelId,keyw,status);
+    public IPage<KeLiItemVo> getLivingOrderKL(Integer status,String keyw,String hotelId,String thirdUserId, Page<KeLiItemVo> page) {
+        IPage<KeLiItemVo> pRes = baseMapper.getKeLiLiving(page,thirdUserId,hotelId,keyw,status);
         List<String> livingIds = pRes.getRecords().stream().map(s->s.getId()).collect(Collectors.toList());
         List<BusLivingLayoutDayPrice> prices = livingIds.size() >0? livingLayoutDayPriceService.list(Wrappers.<BusLivingLayoutDayPrice>query()
         .in("living_order_id",livingIds)) : new ArrayList<>();
@@ -1298,8 +1298,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         return pRes;
     }
     @Override
-    public IPage<KeLiItemVo> getBookingOrderKL(Integer status,String keyw,String hotelId, Page<KeLiItemVo> page) {
-        IPage<KeLiItemVo> pRes = baseMapper.getKeBooking(page,hotelId,keyw,status);
+    public IPage<KeLiItemVo> getBookingOrderKL(Integer status,String keyw,String hotelId,String thirdUserId, Page<KeLiItemVo> page) {
+        IPage<KeLiItemVo> pRes = baseMapper.getKeBooking(page,thirdUserId,hotelId,keyw,status);
         List<String> livingIds = pRes.getRecords().stream().map(s->s.getId()).collect(Collectors.toList());
         List<BusBookingLayoutDayPrice> prices = livingIds.size() >0? dayPriceService.list(Wrappers.<BusBookingLayoutDayPrice>query()
                 .in("booking_order_id",livingIds)) : new ArrayList<>();
@@ -1941,6 +1941,7 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         livingOrder.setPublicRoomFee(bkOrder.getPublicRoomFee());
         livingOrder.setTeamPeopleNumber(bkOrder.getTeamPeopleNumber());
         livingOrder.setBookingOrderId(bkOrder.getId());
+        livingOrder.setThirdLoginUserId(bkOrder.getThirdLoginUserId());
         return livingOrder;
     }
     private BusRoomBookingOrders  copyBookingToAcceptOrder(BusRoomsLivingOrder  bkOrder) {