最近7天

This commit is contained in:
2025-11-24 15:31:05 +08:00
parent e73f470791
commit 143c2a46ed
2 changed files with 6 additions and 5 deletions

View File

@@ -65,7 +65,8 @@ public interface ShopOrderStatisticMapper extends BaseMapper<ShopOrderStatistic>
" tb_shop_order_statistic " +
"WHERE " +
" shop_id = #{shopId} " +
" AND statistic_date BETWEEN #{start} AND #{end} ")
" AND statistic_date > #{start} " +
" AND statistic_date <= #{end} ")
ShopOrderStatistic countStatistic(Long shopId, LocalDate start, LocalDate end);
//---------------------------------------------金额统计---------------------------------------------------
/**
@@ -97,7 +98,7 @@ public interface ShopOrderStatisticMapper extends BaseMapper<ShopOrderStatistic>
" tb_shop_order_statistic " +
" WHERE" +
" shop_id = #{shopId} " +
"and statistic_date >= #{start} " +
"and statistic_date > #{start} " +
"and statistic_date <= #{end} " +
"GROUP BY tradeDay")
List<TotalVo> getStatDateRange(Long shopId, LocalDate start, LocalDate end);
@@ -134,7 +135,7 @@ public interface ShopOrderStatisticMapper extends BaseMapper<ShopOrderStatistic>
" SUM(credit_pay_count) as creditPay " +
" FROM tb_shop_order_statistic " +
" WHERE shop_id = #{shopId} " +
" AND statistic_date >= #{start} " +
" AND statistic_date > #{start} " +
" AND statistic_date <= #{end} ")
Map<String, BigDecimal> getPayTypeDateRangeRaw(Long shopId, LocalDate start, LocalDate end);

View File

@@ -58,7 +58,7 @@
LEFT JOIN tb_product prod ON tb_shop_prod_statistic.prod_id = prod.id
WHERE
tb_shop_prod_statistic.shop_id = #{shopId}
AND tb_shop_prod_statistic.create_day &gt;= #{start}
AND tb_shop_prod_statistic.create_day &gt; #{start}
AND tb_shop_prod_statistic.create_day &lt;= #{end}
<if test="productName != null and productName != ''">
AND prod.name LIKE CONCAT('%',#{productName},'%')
@@ -114,7 +114,7 @@
tb_shop_prod_statistic
WHERE
tb_shop_prod_statistic.shop_id = #{shopId}
AND tb_shop_prod_statistic.create_day &gt;= #{start}
AND tb_shop_prod_statistic.create_day &gt; #{start}
AND tb_shop_prod_statistic.create_day &lt;= #{end}
<if test="productName != null and productName != ''">
AND prod.name LIKE CONCAT('%',#{productName},'%')