he2802 1 年之前
父節點
當前提交
e0270182f0

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/top/TopDivideOrderMapper.xml

@@ -286,6 +286,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="accomplishStartTime != null and accomplishStartTime != ''">
             AND v.accomplish_time BETWEEN #{accomplishStartTime} and #{accomplishEndTime}
         </if>
+        <if test="buyStartTime != null and buyStartTime != ''">
+            AND v.create_time BETWEEN #{buyStartTime} and #{buyEndTime}
+        </if>
         <if test="tenantId != null and tenantId != ''">
             AND v.tenant_id = #{tenantId}
         </if>

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

@@ -1332,7 +1332,7 @@
             FROM
             `goods` `g`
             LEFT JOIN `course_education_type` `cet` ON `g`.`education_type_id` = `cet`.`id`
-            LEFT JOIN `course_project_type` `cpt` ON `g`.`education_type_id` = `cpt`.`id`
+            LEFT JOIN `course_project_type` `cpt` ON `g`.`project_id` = `cpt`.`id`
             LEFT JOIN `course_business` `cb` ON `g`.`business_id` = `cb`.`id`
             ) oug
             WHERE
@@ -1509,7 +1509,7 @@
             FROM
             order_goods og LEFT JOIN  `goods` `g` on og.goods_id = `g`.goods_id
             LEFT JOIN `course_education_type` `cet` ON `g`.`education_type_id` = `cet`.`id`
-            LEFT JOIN `course_project_type` `cpt` ON `g`.`education_type_id` = `cpt`.`id`
+            LEFT JOIN `course_project_type` `cpt` ON `g`.`project_id` = `cpt`.`id`
             LEFT JOIN `course_business` `cb` ON `g`.`business_id` = `cb`.`id`
             ) oug
             WHERE
@@ -1600,7 +1600,7 @@
             FROM
             order_goods og LEFT JOIN  `goods` `g` on og.goods_id = `g`.goods_id
             LEFT JOIN `course_education_type` `cet` ON `g`.`education_type_id` = `cet`.`id`
-            LEFT JOIN `course_project_type` `cpt` ON `g`.`education_type_id` = `cpt`.`id`
+            LEFT JOIN `course_project_type` `cpt` ON `g`.`project_id` = `cpt`.`id`
             LEFT JOIN `course_business` `cb` ON `g`.`business_id` = `cb`.`id`
             ) oug
             WHERE
@@ -1688,7 +1688,7 @@
             FROM
             `goods` `g`
             LEFT JOIN `course_education_type` `cet` ON `g`.`education_type_id` = `cet`.`id`
-            LEFT JOIN `course_project_type` `cpt` ON `g`.`education_type_id` = `cpt`.`id`
+            LEFT JOIN `course_project_type` `cpt` ON `g`.`project_id` = `cpt`.`id`
             LEFT JOIN `course_business` `cb` ON `g`.`business_id` = `cb`.`id`
             ) oug
             WHERE
@@ -1806,7 +1806,7 @@
                                     `g`.`education_type_id` = `cet`.`id`
                                     )))
                                 LEFT JOIN `course_project_type` `cpt` ON ((
-                                    `g`.`education_type_id` = `cpt`.`id`
+                                    `g`.`project_id` = `cpt`.`id`
                                     )))
                                 LEFT JOIN `course_business` `cb` ON ((
                                 `g`.`business_id` = `cb`.`id`
@@ -1907,7 +1907,7 @@
                                 `g`.`education_type_id` = `cet`.`id`
                                 )))
                             LEFT JOIN `course_project_type` `cpt` ON ((
-                                `g`.`education_type_id` = `cpt`.`id`
+                                `g`.`project_id` = `cpt`.`id`
                                 )))
                             LEFT JOIN `course_business` `cb` ON ((
                             `g`.`business_id` = `cb`.`id`
@@ -2064,7 +2064,7 @@
         `g`.`education_type_id` = `cet`.`id`
         )))
         LEFT JOIN `course_project_type` `cpt` ON ((
-        `g`.`education_type_id` = `cpt`.`id`
+        `g`.`project_id` = `cpt`.`id`
         )))
         LEFT JOIN `course_business` `cb` ON ((
         `g`.`business_id` = `cb`.`id`
@@ -2224,7 +2224,7 @@
             FROM
             `goods` `g`
             LEFT JOIN `course_education_type` `cet` ON `g`.`education_type_id` = `cet`.`id`
-            LEFT JOIN `course_project_type` `cpt` ON `g`.`education_type_id` = `cpt`.`id`
+            LEFT JOIN `course_project_type` `cpt` ON `g`.`project_id` = `cpt`.`id`
             LEFT JOIN `course_business` `cb` ON `g`.`business_id` = `cb`.`id`
             ) oug
             WHERE
@@ -2329,7 +2329,7 @@
         `g`.`education_type_id` = `cet`.`id`
         )))
         LEFT JOIN `course_project_type` `cpt` ON ((
-        `g`.`education_type_id` = `cpt`.`id`
+        `g`.`project_id` = `cpt`.`id`
         )))
         LEFT JOIN `course_business` `cb` ON ((
         `g`.`business_id` = `cb`.`id`
@@ -2536,7 +2536,7 @@
         `g`.`education_type_id` = `cet`.`id`
         )))
         LEFT JOIN `course_project_type` `cpt` ON ((
-        `g`.`education_type_id` = `cpt`.`id`
+        `g`.`project_id` = `cpt`.`id`
         )))
         LEFT JOIN `course_business` `cb` ON ((
         `g`.`business_id` = `cb`.`id`