diff --git a/cash-service/order-service/src/main/java/com/czg/service/order/mapper/ShopTableOrderStatisticMapper.java b/cash-service/order-service/src/main/java/com/czg/service/order/mapper/ShopTableOrderStatisticMapper.java index 5e4affdb..cb9d665c 100644 --- a/cash-service/order-service/src/main/java/com/czg/service/order/mapper/ShopTableOrderStatisticMapper.java +++ b/cash-service/order-service/src/main/java/com/czg/service/order/mapper/ShopTableOrderStatisticMapper.java @@ -21,4 +21,6 @@ public interface ShopTableOrderStatisticMapper extends BaseMapper findSummaryList(TableSummaryParam param); + + List findSummaryList2(TableSummaryParam param); } diff --git a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/TableSummaryServiceImpl.java b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/TableSummaryServiceImpl.java index 953ce14b..6a6c8fdd 100644 --- a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/TableSummaryServiceImpl.java +++ b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/TableSummaryServiceImpl.java @@ -23,7 +23,7 @@ public class TableSummaryServiceImpl implements TableSummaryService { @Override public List summaryList(TableSummaryParam param) { - return shopTableOrderStatisticMapper.findSummaryList(param); + return shopTableOrderStatisticMapper.findSummaryList2(param); } } diff --git a/cash-service/order-service/src/main/resources/mapper/ShopOrderStatisticMapper.xml b/cash-service/order-service/src/main/resources/mapper/ShopOrderStatisticMapper.xml index 0a2153b7..a88d8e16 100644 --- a/cash-service/order-service/src/main/resources/mapper/ShopOrderStatisticMapper.xml +++ b/cash-service/order-service/src/main/resources/mapper/ShopOrderStatisticMapper.xml @@ -64,11 +64,11 @@ WHERE t1.shop_id = #{shopId} and t1.paid_time is not null - and t1.create_time >= str_to_date(concat(#{beginDate},' 00:00:00'), '%Y-%m-%d %H:%i:%s') + and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s') group by t1.pay_type @@ -79,11 +79,11 @@ from tb_shop_user_flow t1 where t1.shop_id = #{shopId} - and t1.create_time >= str_to_date(concat(#{beginDate},' 00:00:00'), '%Y-%m-%d %H:%i:%s') + and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s') group by t1.biz_code @@ -96,11 +96,11 @@ WHERE t1.shop_id = #{shopId} and t1.paid_time is not null - and t1.create_time >= str_to_date(concat(#{beginDate},' 00:00:00'), '%Y-%m-%d %H:%i:%s') + and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s') @@ -112,11 +112,11 @@ WHERE t1.shop_id = #{shopId} and t1.paid_time is not null - and t1.create_time >= str_to_date(concat(#{beginDate},' 00:00:00'), '%Y-%m-%d %H:%i:%s') + 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/ShopProdStatisticMapper.xml b/cash-service/order-service/src/main/resources/mapper/ShopProdStatisticMapper.xml index 160ac40a..756d551b 100644 --- a/cash-service/order-service/src/main/resources/mapper/ShopProdStatisticMapper.xml +++ b/cash-service/order-service/src/main/resources/mapper/ShopProdStatisticMapper.xml @@ -100,11 +100,11 @@ and t2.category_id like concat('%,', #{prodCategoryId}, ',%') - and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d') + and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s') @@ -129,11 +129,11 @@ and t2.category_id = #{prodCategoryId} - and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d') + and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s') GROUP BY t1.product_id,t1.product_name @@ -148,11 +148,11 @@ from tb_order_detail t1 where t1.shop_id = #{shopId} - and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d') + and t1.create_time >= str_to_date(#{beginDate}, '%Y-%m-%d %H:%i:%s') GROUP BY t1.product_id,t1.product_name 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 96a671d6..533d2c09 100644 --- a/cash-service/order-service/src/main/resources/mapper/ShopTableOrderStatisticMapper.xml +++ b/cash-service/order-service/src/main/resources/mapper/ShopTableOrderStatisticMapper.xml @@ -43,9 +43,34 @@ AND t1.create_day >= str_to_date(#{beginDate}, '%Y-%m-%d') - and t2.create_day <= str_to_date(#{endDate}, '%Y-%m-%d') + and t1.create_day <= str_to_date(#{endDate}, '%Y-%m-%d') group by t1.table_id order by sum(t1.order_count) desc,max(t1.id) desc +