|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
|
|
|
<select id="getTodayBookingOrder" resultType="org.jeecg.modules.business.dto.TodayBookingQueryDto">
|
|
|
- select o.id,br.room_id from bus_booking_rooms br inner join
|
|
|
+ select o.id as booking_order_id,br.room_id from bus_booking_rooms br inner join
|
|
|
(
|
|
|
select id from bus_room_booking_orders where booking_status = 1 and DATE_FORMAT(arrival_time,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
|
|
|
) as o on br.booking_orders_id = o.id
|
|
|
@@ -20,9 +20,11 @@
|
|
|
select id from bus_room_booking_orders where booking_status = 1 and arrival_time > now()
|
|
|
and
|
|
|
(
|
|
|
- (#{startAt} > arrival_time and #{startAt} < due_out_time)
|
|
|
+ (#{startAt} > arrival_time and #{startAt} < due_out_time) -- 头在时间段内
|
|
|
or
|
|
|
- (#{endAt} > arrival_time and #{endAt} < due_out_time)
|
|
|
+ (#{endAt} > arrival_time and #{endAt} < due_out_time) -- 屁股在时间段内
|
|
|
+ or
|
|
|
+ (#{startAt} < arrival_time and #{endAt} > due_out_time) -- 包含在起止时间内
|
|
|
)
|
|
|
) as o inner join bus_booking_rooms br
|
|
|
on o.id = br .booking_orders_id
|