|
@@ -6,7 +6,7 @@
|
|
|
<select id="getTodayBookingOrder" resultType="org.jeecg.modules.business.dto.TodayBookingQueryDto">
|
|
<select id="getTodayBookingOrder" resultType="org.jeecg.modules.business.dto.TodayBookingQueryDto">
|
|
|
select o.id as booking_order_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')
|
|
|
|
|
|
|
+ select id from bus_room_booking_orders where booking_status = 1 and DATE_FORMAT(arrival_time,'%Y-%m-%d') = DATE_FORMAT(ADDDATE(now(),INTERVAL 8 HOUR),'%Y-%m-%d')
|
|
|
) as o on br.booking_orders_id = o.id
|
|
) as o on br.booking_orders_id = o.id
|
|
|
where br.room_id in
|
|
where br.room_id in
|
|
|
<foreach collection="roomIds" item="roomId" open="(" close=")" separator=",">
|
|
<foreach collection="roomIds" item="roomId" open="(" close=")" separator=",">
|
|
@@ -17,7 +17,7 @@
|
|
|
<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 CONCAT(IFNULL(r.prefix,''),r.`name`) as room_id from
|
|
|
(
|
|
(
|
|
|
- select id from bus_room_booking_orders where booking_status = 1 and arrival_time > now()
|
|
|
|
|
|
|
+ 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) -- 头在时间段内
|