qh преди 2 години
родител
ревизия
9a1eb6960c

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

@@ -15,16 +15,16 @@
     </select>
     
     <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)
             and
             (
-                (#{startAt} > arrival_time and #{startAt} &lt; due_out_time) -- 头在时间段内
+                (#{startAt} >= arrival_time and #{startAt} &lt;= due_out_time) -- 头在时间段内
                 or
-                (#{endAt} > arrival_time and #{endAt} &lt; due_out_time) -- 屁股在时间段内
+                (#{endAt} >= arrival_time and #{endAt} &lt;= due_out_time) -- 屁股在时间段内
                 or
-                (#{startAt} &lt; arrival_time and #{endAt} > due_out_time) -- 包含在起止时间内
+                (#{startAt} &lt;= arrival_time and #{endAt} >= due_out_time) -- 包含在起止时间内
             )
         ) as o inner join bus_booking_rooms br
         on o.id = br .booking_orders_id