|
@@ -15,16 +15,16 @@
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="conflictBookingTime" resultType="org.jeecg.modules.business.entity.BusBookingRooms">
|
|
<select id="conflictBookingTime" resultType="org.jeecg.modules.business.entity.BusBookingRooms">
|
|
|
- select CONCAT(IFNULL(r.prefix,''),r.`name`) as room_id from
|
|
|
|
|
|
|
+ select DISTINCT CONCAT(IFNULL(r.prefix,''),r.`name`) as room_id from
|
|
|
(
|
|
(
|
|
|
select id from bus_room_booking_orders where booking_status = 1 and arrival_time > ADDDATE(now(),INTERVAL 8 HOUR)
|
|
select id from bus_room_booking_orders where booking_status = 1 and arrival_time > ADDDATE(now(),INTERVAL 8 HOUR)
|
|
|
and
|
|
and
|
|
|
(
|
|
(
|
|
|
- (#{startAt} > arrival_time and #{startAt} < due_out_time) -- 头在时间段内
|
|
|
|
|
|
|
+ (#{startAt} >= arrival_time and #{startAt} <= due_out_time) -- 头在时间段内
|
|
|
or
|
|
or
|
|
|
- (#{endAt} > arrival_time and #{endAt} < due_out_time) -- 屁股在时间段内
|
|
|
|
|
|
|
+ (#{endAt} >= arrival_time and #{endAt} <= due_out_time) -- 屁股在时间段内
|
|
|
or
|
|
or
|
|
|
- (#{startAt} < arrival_time and #{endAt} > due_out_time) -- 包含在起止时间内
|
|
|
|
|
|
|
+ (#{startAt} <= arrival_time and #{endAt} >= due_out_time) -- 包含在起止时间内
|
|
|
)
|
|
)
|
|
|
) as o inner join bus_booking_rooms br
|
|
) as o inner join bus_booking_rooms br
|
|
|
on o.id = br .booking_orders_id
|
|
on o.id = br .booking_orders_id
|