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')