|
@@ -268,6 +268,18 @@
|
|
|
FROM top_old_order_goods too
|
|
|
WHERE ot.order_sn = too.order_sn AND too.rel_sign_id IS NOT NULL AND too.check_status = #{studentCheckStatus}) > 0
|
|
|
</if>
|
|
|
+ <if test="refundStartTime != null or refundEndTime != null">
|
|
|
+ AND (SELECT COUNT(*)
|
|
|
+ FROM top_old_order_refund tor
|
|
|
+ WHERE ot.order_sn = tor.order_sn AND tor.`status` = 1
|
|
|
+ <if test="refundStartTime != null and refundStartTime != ''">
|
|
|
+ AND tor.pay_check_time >= #{refundStartTime}
|
|
|
+ </if>
|
|
|
+ <if test="refundEndTime != null and refundEndTime != ''">
|
|
|
+ AND tor.pay_check_time <= #{refundEndTime}
|
|
|
+ </if>
|
|
|
+ ) > 0
|
|
|
+ </if>
|
|
|
<if test="tenantId != null and tenantId != ''">
|
|
|
AND ot.tenant_id = #{tenantId}
|
|
|
</if>
|
|
@@ -325,6 +337,18 @@
|
|
|
<if test="refundStatus != null">
|
|
|
AND o.order_refund_status = #{refundStatus}
|
|
|
</if>
|
|
|
+ <if test="refundStartTime != null or refundEndTime != null">
|
|
|
+ AND (SELECT COUNT(*)
|
|
|
+ FROM top_old_order_refund tor
|
|
|
+ WHERE o.order_sn = tor.order_sn AND tor.`status` = 1
|
|
|
+ <if test="refundStartTime != null and refundStartTime != ''">
|
|
|
+ AND tor.pay_check_time >= #{refundStartTime}
|
|
|
+ </if>
|
|
|
+ <if test="refundEndTime != null and refundEndTime != ''">
|
|
|
+ AND tor.pay_check_time <= #{refundEndTime}
|
|
|
+ </if>
|
|
|
+ ) > 0
|
|
|
+ </if>
|
|
|
<if test="refundStatusList != null and refundStatusList.size()!=0 ">
|
|
|
AND o.order_refund_status in
|
|
|
<foreach collection="refundStatusList" item="item" index="index" open="(" close=")" separator=",">
|