From 55c8a6da9017ec2ac2ae668581de9530829d633b Mon Sep 17 00:00:00 2001 From: Tankaikai Date: Wed, 26 Mar 2025 01:51:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/ShopProdStatisticMapper.xml | 3 +++ .../main/resources/mapper/ShopTableOrderStatisticMapper.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/cash-service/order-service/src/main/resources/mapper/ShopProdStatisticMapper.xml b/cash-service/order-service/src/main/resources/mapper/ShopProdStatisticMapper.xml index 756d551ba..d8bd485e2 100644 --- a/cash-service/order-service/src/main/resources/mapper/ShopProdStatisticMapper.xml +++ b/cash-service/order-service/src/main/resources/mapper/ShopProdStatisticMapper.xml @@ -93,6 +93,7 @@ GROUP BY x1.order_id ) t2 on t1.id = t2.order_id where t1.shop_id = #{shopId} + and t1.status in ('part-refund','refund','done') and t2.product_name like concat('%', #{productName}, '%') @@ -122,6 +123,7 @@ left join tb_product t2 on t1.product_id = t2.id left join tb_shop_prod_category t3 on t2.category_id = t3.id where t1.shop_id = #{shopId} + and t1.status in ('part-refund','refund','done') and t1.product_name like concat('%', #{productName}, '%') @@ -147,6 +149,7 @@ sum(t1.pay_amount) as amount from tb_order_detail t1 where t1.shop_id = #{shopId} + and t1.status = 'done' and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s') diff --git a/cash-service/order-service/src/main/resources/mapper/ShopTableOrderStatisticMapper.xml b/cash-service/order-service/src/main/resources/mapper/ShopTableOrderStatisticMapper.xml index 533d2c098..93efb660f 100644 --- a/cash-service/order-service/src/main/resources/mapper/ShopTableOrderStatisticMapper.xml +++ b/cash-service/order-service/src/main/resources/mapper/ShopTableOrderStatisticMapper.xml @@ -64,6 +64,7 @@ where t1.shop_id = #{shopId} and t1.table_code is not null and t2.name is not null + and t1.paid_time is not null AND t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s')