From 2d6895f99ce9d5fff6c1c6b353e61dc7938418a5 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期二, 20 四月 2021 20:20:47 +0800
Subject: [PATCH] bug修复

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopOrderDAO.java |    6 +++---
 1 files changed, 3 insertions(+), 3 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 7c3583f..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
@@ -189,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" +
@@ -197,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" +
@@ -205,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