|
@@ -106,33 +106,35 @@
|
|
|
where payment_no is null
|
|
|
</select>
|
|
|
<select id="selectMatchList" resultType="java.util.Map">
|
|
|
+ <![CDATA[
|
|
|
SELECT a.book_trade_no,
|
|
|
- a.book_order_no,
|
|
|
- a.`station_code`,
|
|
|
- a.`payment_no`
|
|
|
+ a.book_order_no,
|
|
|
+ a.`station_code`,
|
|
|
+ a.`payment_no`
|
|
|
FROM hm_book_trade_order a
|
|
|
- LEFT JOIN hm_book_order b
|
|
|
- ON b.book_trade_no = a.book_trade_no
|
|
|
+ LEFT JOIN hm_book_order b
|
|
|
+ ON b.book_trade_no = a.book_trade_no
|
|
|
WHERE a.status != 4
|
|
|
AND (
|
|
|
- a.`start_time` BETWEEN (CURRENT_DATE - INTERVAL 31 DAY)
|
|
|
- AND (CURRENT_DATE + INTERVAL 31 DAY)
|
|
|
+ LEFT(a.begin_time, 10) < (CURRENT_DATE + INTERVAL 31 DAY)
|
|
|
+ AND LEFT(a.begin_time, 10) >= (CURRENT_DATE - INTERVAL 31 DAY)
|
|
|
)
|
|
|
AND b.book_order_no IS NULL
|
|
|
UNION
|
|
|
SELECT a.book_trade_no,
|
|
|
- a.book_order_no,
|
|
|
- a.`station_code`,
|
|
|
- a.`payment_no`
|
|
|
+ a.book_order_no,
|
|
|
+ a.`station_code`,
|
|
|
+ a.`payment_no`
|
|
|
FROM hm_book_trade_order a
|
|
|
- LEFT JOIN hm_book_order b
|
|
|
- ON b.book_trade_no = a.book_trade_no
|
|
|
+ LEFT JOIN hm_book_order b
|
|
|
+ ON b.book_trade_no = a.book_trade_no
|
|
|
WHERE a.status != 4
|
|
|
AND (
|
|
|
- a.`start_time` BETWEEN (CURRENT_DATE - INTERVAL 31 DAY)
|
|
|
- AND (CURRENT_DATE + INTERVAL 31 DAY)
|
|
|
+ LEFT(a.begin_time, 10) < (CURRENT_DATE + INTERVAL 31 DAY)
|
|
|
+ AND LEFT(a.begin_time, 10) >= (CURRENT_DATE - INTERVAL 31 DAY)
|
|
|
)
|
|
|
AND b.shop_name IS NULL
|
|
|
+ ]]>
|
|
|
</select>
|
|
|
<select id="selectByBookOrderNo" resultMap="BaseResultMap">
|
|
|
select
|