he2802 1 年之前
父节点
当前提交
78646627dd
共有 1 个文件被更改,包括 54 次插入2 次删除
  1. 54 2
      zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml

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

@@ -1086,6 +1086,9 @@
                         <if test="tenantId != null and tenantId != ''">
                             AND tenant_id = #{tenantId}
                         </if>
+                        <if test="customerId != null and customerId != ''">
+                            AND tenant_id  = #{customerId}
+                        </if>
                         GROUP BY
                             tenant_id
                         <if test="tenantId != null and tenantId != ''">
@@ -1116,6 +1119,9 @@
                         </if>
                         <if test="tenantId != null and tenantId != ''">
                             AND o.tenant_id = #{tenantId}
+                        </if>
+                        <if test="customerId != null and customerId != ''">
+                            AND o.tenant_id  = #{customerId}
                         </if>
 		                AND og.pay_status != 1
                         GROUP BY
@@ -1161,6 +1167,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND o.tenant_id = #{tenantId}
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND o.tenant_id  = #{customerId}
+        </if>
         <if test="createNo != null and createNo != ''">
             AND 1=0
         </if>
@@ -1180,6 +1189,9 @@
         <if test="createNo != null and createNo != ''">
             AND vo.create_no = #{createNo}
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND vo.tenant_id  = #{customerId}
+        </if>
     </select>
 
     <select id="getTenantStatisticsOrderNum" parameterType="com.zhongzheng.modules.top.order.bo.TopOrderStatisticsBo"
@@ -1219,6 +1231,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND tenant_id = #{tenantId}
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND tenant_id  = #{customerId}
+        </if>
         GROUP BY
         tenant_id
         <if test="tenantId != null and tenantId != ''">
@@ -1250,6 +1265,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND o.tenant_id = #{tenantId}
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND o.tenant_id  = #{customerId}
+        </if>
         AND og.pay_status != 1
         GROUP BY
         og.tenant_id
@@ -1288,6 +1306,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND o.tenant_id = #{tenantId}
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND o.tenant_id  = #{customerId}
+        </if>
         <if test="createNo != null and createNo != ''">
             AND 1=0
         </if>
@@ -1308,6 +1329,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND tenant_id = #{tenantId}
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND tenant_id  = #{customerId}
+        </if>
         <if test="createNo != null and createNo != ''">
             AND create_no = #{createNo}
         </if>
@@ -1338,6 +1362,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND o.tenant_id = #{tenantId}
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND o.tenant_id  = #{customerId}
+        </if>
         )) AS orderNum
         FROM
         top_old_order too
@@ -1354,7 +1381,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND too.tenant_id = #{tenantId}
         </if>
-
+        <if test="customerId != null and customerId != ''">
+            AND too.tenant_id  = #{customerId}
+        </if>
     </select>
 
     <select id="getMoneyStatisticsWithBo" parameterType="com.zhongzheng.modules.top.order.bo.TopOrderStatisticsBo"
@@ -1384,6 +1413,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND o.tenant_id = #{tenantId}
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND o.tenant_id  = #{customerId}
+        </if>
         ) AS money
         FROM
         top_old_order too
@@ -1400,7 +1432,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND too.tenant_id = #{tenantId}
         </if>
-
+        <if test="customerId != null and customerId != ''">
+            AND too.tenant_id  = #{customerId}
+        </if>
     </select>
 
     <select id="getBusinessOrderMoney" parameterType="com.zhongzheng.modules.top.order.bo.TopOrderStatisticsBo"
@@ -1450,6 +1484,9 @@
                 <if test="businessName != null and businessName != ''">
                     AND ouu.business_name = #{businessName}
                 </if>
+                <if test="customerId != null and customerId != ''">
+                    AND oo.tenant_id  = #{customerId}
+                </if>
                 GROUP BY
                     ouu.business_name UNION ALL
                 SELECT
@@ -1494,6 +1531,9 @@
                             <if test="createNo != null and createNo != ''">
                                 AND 1=0
                             </if>
+                            <if test="customerId != null and customerId != ''">
+                                AND og.tenant_id  = #{customerId}
+                            </if>
 			AND og.refund_status != 2
                     ) nou
         WHERE 1=1
@@ -1545,6 +1585,9 @@
             <if test="createNo != null and createNo != ''">
                 AND oo.create_no = #{createNo}
             </if>
+            <if test="customerId != null and customerId != ''">
+                AND oo.tenant_id  = #{customerId}
+            </if>
             GROUP BY
                 ouu.business_name UNION ALL
             SELECT
@@ -1587,6 +1630,9 @@
         <if test="tenantId != null and tenantId != ''">
             AND og.tenant_id = #{tenantId}
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND og.tenant_id  = #{customerId}
+        </if>
         <if test="createNo != null and createNo != ''">
             AND 1=0
         </if>
@@ -1627,6 +1673,9 @@
                 <if test="createNo != null and createNo != ''">
                     AND oo.create_no = #{createNo}
                 </if>
+                <if test="customerId != null and customerId != ''">
+                    AND oo.tenant_id  = #{customerId}
+                </if>
             )
                 order_num
         FROM
@@ -1652,6 +1701,9 @@
         <if test="createNo != null and createNo != ''">
             AND 1=0
         </if>
+        <if test="customerId != null and customerId != ''">
+            AND og.tenant_id  = #{customerId}
+        </if>
     </select>
 
     <select id="getBusinessList" parameterType="com.zhongzheng.modules.top.order.bo.TopOrderStatisticsBo"