From e61a2c3adb56e8b89ad7bf7a021b5aa137f062ce Mon Sep 17 00:00:00 2001 From: wany <13995595726@qq.com> Date: Tue, 11 Mar 2025 16:41:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cowr/ssjygl/stat/sale/OrderStatService.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ssjygl-xsct-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java b/ssjygl-xsct-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java index 285d8c9..b673a46 100644 --- a/ssjygl-xsct-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java +++ b/ssjygl-xsct-common/src/main/java/com/cowr/ssjygl/stat/sale/OrderStatService.java @@ -542,10 +542,10 @@ public class OrderStatService { // saleParams += " and t.sale_type = 0 \n"; } - if (type != null){ - saleParams += " and s.type = ? \n"; - params.add(type); - } +// if (type != null){ +// saleParams += " and s.type = ? \n"; +// params.add(type); +// } params.addAll(params); //2025-03-06更改,解决砂站商品删除后月统计数据查询不到问题 @@ -563,11 +563,11 @@ public class OrderStatService { String sql = "select m.* from (" + selectSql + "left join (\n" + commonSql + " ) a on a.id = t.supermarket_id and a.product_id = t.product_id\n" + " left join supermarket s on s.id = t.supermarket_id\n" + - " left join product p on p.id = t.product_id\n" + + " left join product p on p.id = t.product_id where s.type = 0 \n" + "union\n" + selectSql + "right join (\n" + commonSql + " ) a on a.id = t.supermarket_id and a.product_id = t.product_id\n" + " left join supermarket s on s.id = a.id\n" + - " left join product p on p.id = a.product_id ) m order by m.id,m.product_id"; + " left join product p on p.id = a.product_id where s.type = 0) m order by m.id,m.product_id"; /** String sql = "select s.id, s.name, s.name2, p.id product_id, p.`name` product_name, ifnull(a.orderCount, 0) as orderCount, ifnull(a.totalPrice, 0) as totalPrice, ifnull(a.weight, 0) as weight\n" + @@ -4020,8 +4020,9 @@ public class OrderStatService { "FROM\n" + " supermarket t\n" + "WHERE\n" + - " id <= 6\n" + - "OR id = 11 or id = 12 " +// " id <= 6\n" + +// "OR id = 11 or id = 12 " + "t.type = 0 " ); List shParamsList = new ArrayList<>();