|
@@ -119,7 +119,7 @@
|
|
AND vto.invoice_status = #{invoiceStatus}
|
|
AND vto.invoice_status = #{invoiceStatus}
|
|
</if>
|
|
</if>
|
|
<if test="orderOrg != null and orderOrg != ''">
|
|
<if test="orderOrg != null and orderOrg != ''">
|
|
- AND vto.order_org LIKE CONCAT( '%', #{orderOrg}, '%' )
|
|
|
|
|
|
+ AND vto.order_org = #{orderOrg}
|
|
</if>
|
|
</if>
|
|
<if test="purchaseOrg != null and purchaseOrg != ''">
|
|
<if test="purchaseOrg != null and purchaseOrg != ''">
|
|
AND vto.purchase_org LIKE CONCAT( '%', #{purchaseOrg}, '%' )
|
|
AND vto.purchase_org LIKE CONCAT( '%', #{purchaseOrg}, '%' )
|
|
@@ -167,9 +167,16 @@
|
|
</if>
|
|
</if>
|
|
<if test="studentCheckStatus != null">
|
|
<if test="studentCheckStatus != null">
|
|
AND (vto.order_from != 1
|
|
AND (vto.order_from != 1
|
|
- AND (SELECT COUNT(too.order_sn)
|
|
|
|
- FROM top_old_order_goods too
|
|
|
|
- WHERE vto.order_sn = too.order_sn AND too.rel_sign_id IS NOT NULL AND too.check_status = #{studentCheckStatus}) > 0)
|
|
|
|
|
|
+ AND (
|
|
|
|
+ SELECT
|
|
|
|
+ too.check_status
|
|
|
|
+ FROM
|
|
|
|
+ top_old_order_goods too
|
|
|
|
+ WHERE
|
|
|
|
+ vto.order_sn = too.order_sn
|
|
|
|
+ AND too.rel_sign_id IS NOT NULL
|
|
|
|
+ ORDER BY too.order_goods_id DESC
|
|
|
|
+ LIMIT 1 ) = #{studentCheckStatus}
|
|
</if>
|
|
</if>
|
|
<if test="orderSnList != null and orderSnList.size()!=0 ">
|
|
<if test="orderSnList != null and orderSnList.size()!=0 ">
|
|
AND vto.order_sn in
|
|
AND vto.order_sn in
|
|
@@ -224,7 +231,7 @@
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="orderOrg != null and orderOrg != ''">
|
|
<if test="orderOrg != null and orderOrg != ''">
|
|
- AND ot.order_org LIKE CONCAT( '%', #{orderOrg}, '%' )
|
|
|
|
|
|
+ AND ot.order_org = #{orderOrg}
|
|
</if>
|
|
</if>
|
|
<if test="purchaseOrg != null and purchaseOrg != ''">
|
|
<if test="purchaseOrg != null and purchaseOrg != ''">
|
|
AND ot.purchase_org LIKE CONCAT( '%', #{purchaseOrg}, '%' )
|
|
AND ot.purchase_org LIKE CONCAT( '%', #{purchaseOrg}, '%' )
|
|
@@ -266,9 +273,17 @@
|
|
AND ot.finish_status = #{finishStatus}
|
|
AND ot.finish_status = #{finishStatus}
|
|
</if>
|
|
</if>
|
|
<if test="studentCheckStatus != null">
|
|
<if test="studentCheckStatus != null">
|
|
- AND (SELECT COUNT(too.order_sn)
|
|
|
|
- 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
|
|
|
|
|
|
+ AND (vto.order_from != 1
|
|
|
|
+ AND (
|
|
|
|
+ SELECT
|
|
|
|
+ too.check_status
|
|
|
|
+ FROM
|
|
|
|
+ top_old_order_goods too
|
|
|
|
+ WHERE
|
|
|
|
+ vto.order_sn = too.order_sn
|
|
|
|
+ AND too.rel_sign_id IS NOT NULL
|
|
|
|
+ ORDER BY too.order_goods_id DESC
|
|
|
|
+ LIMIT 1 ) = #{studentCheckStatus}
|
|
</if>
|
|
</if>
|
|
<if test="refundStartTime != null or refundEndTime != null">
|
|
<if test="refundStartTime != null or refundEndTime != null">
|
|
AND (SELECT COUNT(*)
|
|
AND (SELECT COUNT(*)
|
|
@@ -357,8 +372,11 @@
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
- <if test="orderOrg != null and orderOrg != ''">
|
|
|
|
- AND 'C端云学堂' LIKE CONCAT( '%', #{orderOrg}, '%' )
|
|
|
|
|
|
+ <if test="orderOrg != null and orderOrg != '' and orderOrg == 'C端云学堂线上'">
|
|
|
|
+ AND o.input_order_sn IS NULL
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderOrg != null and orderOrg != '' and orderOrg == 'C端云学堂线下'">
|
|
|
|
+ AND o.input_order_sn IS NOT NULL
|
|
</if>
|
|
</if>
|
|
<if test="checkStartTime != null and checkStartTime != ''">
|
|
<if test="checkStartTime != null and checkStartTime != ''">
|
|
AND o.pay_time <![CDATA[ >= ]]> #{checkStartTime}
|
|
AND o.pay_time <![CDATA[ >= ]]> #{checkStartTime}
|