yangdamao 1 年之前
父節點
當前提交
69dfa268e6
共有 1 個文件被更改,包括 12 次插入7 次删除
  1. 12 7
      zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml

+ 12 - 7
zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml

@@ -280,7 +280,7 @@
             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>