From 30db4510c06202b3ad0ad4920e561f5f5541d69f Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期二, 20 四月 2021 19:56:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderDAO.java |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderDAO.java
index 904a96e..cf35981 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderDAO.java
@@ -75,6 +75,12 @@
                 "<if test='pageComShopOrderSearchDTO.storeName != null '>" +
                 " AND ss.name like concat('%', #{pageComShopOrderSearchDTO.storeName}, '%') " +
                 " </if> " +
+                "<if test='pageComShopOrderSearchDTO.storeId != null '>" +
+                " AND ss.id = #{pageComShopOrderSearchDTO.storeId} " +
+                " </if> " +
+                "<if test='pageComShopOrderSearchDTO.storeUserId != null '>" +
+                " AND ss.sys_user_id = #{pageComShopOrderSearchDTO.storeUserId} " +
+                " </if> " +
             " GROUP BY sr.id " +
             " ORDER BY sr.create_at "+
             "</script>")
@@ -102,7 +108,10 @@
                 " LEFT JOIN com_shop_store ss ON sr.store_id = ss.id \n" +
             " WHERE sr.delete_status = 1" +
             "<if test='comShopOrderExportDTO.userId != null'>" +
-            " AND ss.user_id = #{comShopOrderExportDTO.userId} " +
+            " AND sr.user_id = #{comShopOrderExportDTO.userId} " +
+            " </if> " +
+            "<if test='comShopOrderExportDTO.storeUserId != null '>" +
+            " AND ss.sys_user_id = #{comShopOrderExportDTO.storeUserId} " +
             " </if> " +
             "<if test='comShopOrderExportDTO.orderIds != null and comShopOrderExportDTO.orderIds.length>0 '>" +
                 " AND sr.id in " +
@@ -180,7 +189,7 @@
             "SELECT ss.sys_user_id, sum(sr.pay_amount) AS t ,  DATE_FORMAT(sr.pay_time,'%Y%m%d') days\n" +
             "FROM com_shop_order sr LEFT JOIN  com_shop_store ss ON sr.store_id = ss.id\n" +
             "WHERE sr.pay_status = 2  AND DATE_FORMAT(sr.pay_time,'%Y%m%d') = DATE_FORMAT(NOW(),'%Y%m%d')\n" +
-            "<if test='userId!=null'>" +
+            "<if test='userId!=null and userId!=0L'>" +
                 " and ss.sys_user_id = #{userId}\n" +
             "</if>" +
             "GROUP BY days\n" +
@@ -188,7 +197,7 @@
             "SELECT ss.sys_user_id, sum(sr.pay_amount) AS t,  DATE_FORMAT(sr.pay_time,'%Y%u') weeks\n" +
             "FROM com_shop_order sr LEFT JOIN  com_shop_store ss ON sr.store_id = ss.id\n" +
             "WHERE sr.pay_status = 2 AND DATE_FORMAT(sr.pay_time,'%Y%u') = DATE_FORMAT(NOW(),'%Y%u')\n" +
-            "<if test='userId!=null'>" +
+            "<if test='userId!=null and userId!=0L'>" +
                 " and ss.sys_user_id = #{userId}\n" +
             "</if>" +
             "GROUP BY weeks\n" +
@@ -196,7 +205,7 @@
             "SELECT ss.sys_user_id, sum(sr.pay_amount) AS t,  DATE_FORMAT(sr.pay_time,'%Y%m') months\n" +
             "FROM com_shop_order sr LEFT JOIN  com_shop_store ss ON sr.store_id = ss.id\n" +
             "WHERE sr.pay_status = 2 AND DATE_FORMAT(sr.pay_time,'%Y%m') = DATE_FORMAT(NOW(),'%Y%m')\n" +
-            "<if test='userId!=null'>" +
+            "<if test='userId!=null and userId!=0L'>" +
                 " and ss.sys_user_id = #{userId}\n" +
             "</if>" +
             "GROUP BY months\n" +

--
Gitblit v1.7.1