字段类型问题

This commit is contained in:
2025-11-24 14:23:52 +08:00
parent 97b03a8495
commit c8b9a82d33
4 changed files with 28 additions and 23 deletions

View File

@@ -119,7 +119,7 @@ public interface ShopOrderStatisticMapper extends BaseMapper<ShopOrderStatistic>
" shop_id = #{shopId} " +
"and trade_day = #{tradeDay} " +
"and paid_time is not null ")
Map<String, Integer> getOnlinePayTypeDate(Long shopId, LocalDate tradeDay);
Map<String, BigDecimal> getOnlinePayTypeDate(Long shopId, LocalDate tradeDay);
/**
* 订单支付方式统计 按日期范围查询
@@ -136,7 +136,7 @@ public interface ShopOrderStatisticMapper extends BaseMapper<ShopOrderStatistic>
" WHERE shop_id = #{shopId} " +
" AND statistic_date >= #{start} " +
" AND statistic_date <= #{end} ")
Map<String, Integer> getPayTypeDateRangeRaw(Long shopId, LocalDate start, LocalDate end);
Map<String, BigDecimal> getPayTypeDateRangeRaw(Long shopId, LocalDate start, LocalDate end);
//*********************以下为日常统计********************************************************************************

View File

@@ -6,6 +6,8 @@
<select id="selectProStatByDay" resultType="com.czg.order.entity.ShopProdStatistic">
SELECT
#{shopId} as shopId,
#{day} as createDay,
CASE WHEN detail.is_temporary = 1 THEN -1 ELSE detail.product_id END AS prodId,
CASE WHEN detail.is_temporary = 1 THEN '临时菜' ELSE prod.name END AS productName,
sum(detail.num-detail.return_num) as saleCount,