|
|
@@ -34,6 +34,38 @@
|
|
|
)
|
|
|
order by b.id desc
|
|
|
</select>
|
|
|
+ <!-- 查询私人订制小程序 -->
|
|
|
+ <select id="getPrivateOrderSmall" resultType="PrivateOrder">
|
|
|
+ SELECT
|
|
|
+ top ${limit} b.*,${orderType} as orderType,e.headpir,e.name as orderName
|
|
|
+ FROM
|
|
|
+ bus_private_ordering AS b
|
|
|
+ JOIN ( SELECT code,demand_uuid FROM bus_private_ordering_type WHERE code = #{code} and order_type = #{orderType}) as c on b.uuid = c.demand_uuid
|
|
|
+ LEFT JOIN sys_users as e on b.code = e.code
|
|
|
+ WHERE
|
|
|
+ uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
|
|
|
+ <if test="startTime != null and startTime !=''">
|
|
|
+ and CONVERT (datetime, start_time) <![CDATA[ >= ]]> #{startTime} and CONVERT(datetime, end_time) <![CDATA[ <= ]]> #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="destination != null and destination !=''">
|
|
|
+ and destination like concat('%', #{destination}, '%')
|
|
|
+ </if>
|
|
|
+ and b.id not in
|
|
|
+ (
|
|
|
+ select top ${page} b.id from bus_private_ordering as b
|
|
|
+ JOIN ( SELECT code,demand_uuid FROM bus_private_ordering_type WHERE code = #{code} and order_type = #{orderType}) as c on b.uuid = c.demand_uuid
|
|
|
+ WHERE
|
|
|
+ uuid NOT IN (SELECT ordering_uuid FROM bus_ignore_supplier WHERE code = #{code})
|
|
|
+ <if test="startTime != null and startTime !=''">
|
|
|
+ and CONVERT (datetime, start_time) <![CDATA[ >= ]]> #{startTime} and CONVERT(datetime, end_time) <![CDATA[ <= ]]> #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="destination != null and destination !=''">
|
|
|
+ and destination like concat('%', #{destination}, '%')
|
|
|
+ </if>
|
|
|
+ order by ${orderBy}
|
|
|
+ )
|
|
|
+ order by ${orderBy}
|
|
|
+ </select>
|
|
|
<!-- 查询私人订制 -->
|
|
|
<select id="getPrivateOrderTwo" resultType="PrivateOrder">
|
|
|
SELECT
|