|
|
@@ -273,14 +273,14 @@
|
|
|
AND ot.finish_status = #{finishStatus}
|
|
|
</if>
|
|
|
<if test="studentCheckStatus != null">
|
|
|
- AND (vto.order_from != 1
|
|
|
+ AND (ot.order_from != 1
|
|
|
AND (
|
|
|
SELECT
|
|
|
too.check_status
|
|
|
FROM
|
|
|
top_old_order_goods too
|
|
|
WHERE
|
|
|
- vto.order_sn = too.order_sn
|
|
|
+ ot.order_sn = too.order_sn
|
|
|
AND too.rel_sign_id IS NOT NULL
|
|
|
ORDER BY too.order_goods_id DESC
|
|
|
LIMIT 1 ) = #{studentCheckStatus} )
|
|
|
@@ -372,12 +372,17 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- <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>
|
|
|
+ <choose>
|
|
|
+ <when test="orderOrg != null and orderOrg != '' and orderOrg == 'C端云学堂线上'">
|
|
|
+ AND o.input_order_sn IS NULL
|
|
|
+ </when>
|
|
|
+ <when test="orderOrg != null and orderOrg != '' and orderOrg == 'C端云学堂线下'">
|
|
|
+ AND o.input_order_sn IS NOT NULL
|
|
|
+ </when>
|
|
|
+ <when test="orderOrg != null and orderOrg != ''">
|
|
|
+ AND o.order_org = #{orderOrg}
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
<if test="checkStartTime != null and checkStartTime != ''">
|
|
|
AND o.pay_time <![CDATA[ >= ]]> #{checkStartTime}
|
|
|
</if>
|
|
|
@@ -397,7 +402,13 @@
|
|
|
AND o.order_id = 0
|
|
|
</if>
|
|
|
<if test="purchaseOrg != null and purchaseOrg != ''">
|
|
|
- AND o.order_id = 0
|
|
|
+ AND (
|
|
|
+ SELECT
|
|
|
+ count(*)
|
|
|
+ FROM
|
|
|
+ sys_tenant t
|
|
|
+ WHERE
|
|
|
+ t.tenant_id = o.tenant_id and t.tenant_name LIKE CONCAT( '%', #{purchaseOrg}, '%' ) limit 1 ) > 0
|
|
|
</if>
|
|
|
<if test="createNo != null and createNo != ''">
|
|
|
AND o.order_id = 0
|