he2802 2 anni fa
parent
commit
9959699a81

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/goods/bo/TopOldOrderQueryBo.java

@@ -113,5 +113,8 @@ public class TopOldOrderQueryBo extends BaseEntity {
 
 	private List<TopBadBillTimeBo> badBillList;
 
+	@ApiModelProperty("C端订单过滤时间")
+	private Long filtrationTime = 1685449126L;
+
 
 }

+ 10 - 2
zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml

@@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         top_old_order ot
         LEFT JOIN top_old_order_goods otg ON ot.order_sn = otg.order_sn
         WHERE
-        1 = 1
+        1 = 1 AND ot.`status` = 1
         <if test="businessFullName != null and businessFullName != ''">
             AND INSTR( otg.business_full_name , #{businessFullName} ) > 0
         </if>
@@ -190,7 +190,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         `order` o
         LEFT JOIN order_goods og ON o.order_sn = og.order_sn
         WHERE
-        1 = 1
+        1 = 1 AND o.`status` IN  (0,1)
+        AND (
+        isnull( `o`.`input_order_sn` )
+        OR (
+        NOT (
+        `o`.`input_order_sn` IN ( SELECT `top_old_order`.`input_order_sn` FROM `top_old_order` ))))
         <if test="businessFullName != null and businessFullName != ''">
             AND (
             SELECT
@@ -235,6 +240,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="startTime != null and startTime != ''">
             AND o.create_time <![CDATA[ >= ]]> #{startTime}
         </if>
+        <if test="startTime == null">
+            AND o.create_time <![CDATA[ > ]]> #{filtrationTime}
+        </if>
         <if test="endTime != null and endTime != ''">
             AND o.create_time <![CDATA[ <= ]]> #{endTime}
         </if>