|
|
@@ -1,36 +1,36 @@
|
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
|
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
-<mapper namespace="org.jeecg.modules.business.mapper.BusRoomBookingOrdersMapper">
|
|
|
-
|
|
|
-
|
|
|
- <select id="getTodayBookingOrder" resultType="org.jeecg.modules.business.dto.TodayBookingQueryDto">
|
|
|
- select o.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
|
|
|
- where br.room_id in
|
|
|
- <foreach collection="roomIds" item="roomId" open="(" close=")" separator=",">
|
|
|
- #{roomId}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="conflictBookingTime" resultType="org.jeecg.modules.business.entity.BusBookingRooms">
|
|
|
- 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()
|
|
|
- and
|
|
|
- (
|
|
|
- (#{startAt} > arrival_time and #{startAt} < due_out_time)
|
|
|
- or
|
|
|
- (#{endAt} > arrival_time and #{endAt} < due_out_time)
|
|
|
- )
|
|
|
- ) as o inner join bus_booking_rooms br
|
|
|
- on o.id = br .booking_orders_id
|
|
|
- inner join ces_rooms r
|
|
|
- on r.id = br.room_id
|
|
|
- where br.room_id in
|
|
|
- <foreach collection="roomIds" item="roomId" open="(" close=")" separator=",">
|
|
|
- #{roomId}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="org.jeecg.modules.business.mapper.BusRoomBookingOrdersMapper">
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getTodayBookingOrder" resultType="org.jeecg.modules.business.dto.TodayBookingQueryDto">
|
|
|
+ select o.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
|
|
|
+ where br.room_id in
|
|
|
+ <foreach collection="roomIds" item="roomId" open="(" close=")" separator=",">
|
|
|
+ #{roomId}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="conflictBookingTime" resultType="org.jeecg.modules.business.entity.BusBookingRooms">
|
|
|
+ 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()
|
|
|
+ and
|
|
|
+ (
|
|
|
+ (#{startAt} > arrival_time and #{startAt} < due_out_time)
|
|
|
+ or
|
|
|
+ (#{endAt} > arrival_time and #{endAt} < due_out_time)
|
|
|
+ )
|
|
|
+ ) as o inner join bus_booking_rooms br
|
|
|
+ on o.id = br .booking_orders_id
|
|
|
+ inner join ces_rooms r
|
|
|
+ on r.id = br.room_id
|
|
|
+ where br.room_id in
|
|
|
+ <foreach collection="roomIds" item="roomId" open="(" close=")" separator=",">
|
|
|
+ #{roomId}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
</mapper>
|