|
@@ -112,7 +112,26 @@
|
|
|
</trim>
|
|
|
) e
|
|
|
where
|
|
|
- e.id not in (select top ${page} f.id from (select id,jdrq from bus_travel UNION ALL select id,jdrq from bus_supplier_route) f ORDER BY f.jdrq desc)
|
|
|
+ e.id not in (
|
|
|
+ select top ${page} f.id
|
|
|
+ from
|
|
|
+ (select id,jdrq
|
|
|
+ from bus_travel
|
|
|
+ <trim prefix="WHERE" prefixOverrides="and | or">
|
|
|
+ <if test="destination != null and destination != ''">
|
|
|
+ destination = #{destination}
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ UNION ALL
|
|
|
+ select
|
|
|
+ id,jdrq
|
|
|
+ from bus_supplier_route
|
|
|
+ <trim prefix="WHERE" prefixOverrides="and | or">
|
|
|
+ <if test="destination != null and destination != ''">
|
|
|
+ destination = #{destination}
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ ) f ORDER BY f.jdrq desc)
|
|
|
ORDER BY
|
|
|
e.jdrq desc
|
|
|
</select>
|
|
@@ -236,18 +255,42 @@
|
|
|
<!-- 查询游记总数 -->
|
|
|
<select id="getTravelCountAll" resultType="int">
|
|
|
select count(*) as count
|
|
|
- from bus_travel
|
|
|
- <trim prefix="WHERE" prefixOverrides="and | or">
|
|
|
- <if test="stateType != null and stateType != ''">
|
|
|
- and state_type = #{stateType}
|
|
|
- </if>
|
|
|
- <if test="demandUuid != null and demandUuid != ''">
|
|
|
- and demand_uuid = #{demandUuid}
|
|
|
- </if>
|
|
|
- <if test="code != null and code != ''">
|
|
|
- and code = #{code}
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select id
|
|
|
+ from bus_travel
|
|
|
+ <trim prefix="WHERE" prefixOverrides="and | or">
|
|
|
+ <if test="stateType != null and stateType != ''">
|
|
|
+ and state_type = #{stateType}
|
|
|
+ </if>
|
|
|
+ <if test="demandUuid != null and demandUuid != ''">
|
|
|
+ and demand_uuid = #{demandUuid}
|
|
|
+ </if>
|
|
|
+ <if test="code != null and code != ''">
|
|
|
+ and code = #{code}
|
|
|
+ </if>
|
|
|
+ <if test="destination != null and destination != ''">
|
|
|
+ destination = #{destination}
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ UNION ALL
|
|
|
+ select id
|
|
|
+ FROM bus_supplier_route
|
|
|
+ <trim prefix="WHERE" prefixOverrides="and | or">
|
|
|
+ <if test="stateType != null and stateType != ''">
|
|
|
+ and state_type = #{stateType}
|
|
|
+ </if>
|
|
|
+ <if test="demandUuid != null and demandUuid != ''">
|
|
|
+ and demand_uuid = #{demandUuid}
|
|
|
+ </if>
|
|
|
+ <if test="code != null and code != ''">
|
|
|
+ and code = #{code}
|
|
|
+ </if>
|
|
|
+ <if test="destination != null and destination != ''">
|
|
|
+ destination = #{destination}
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ ) a
|
|
|
</select>
|
|
|
<!-- 查询游记总数个人 -->
|
|
|
<select id="getTravelCount" resultType="int">
|