【修复】商城系统:管理后台的商城订单统计数据有问题
This commit is contained in:
parent
f9a50116bc
commit
3f7e99c938
@ -58,8 +58,8 @@ public interface TradeOrderStatisticsMapper extends BaseMapperX<TradeStatisticsD
|
||||
|
||||
Long selectCountByStatusAndDeliveryType(@Param("status") Integer status, @Param("deliveryType") Integer deliveryType);
|
||||
|
||||
TradeOrderSummaryRespVO selectPaySummaryByStatusAndPayTimeBetween(@Param("status") Integer status,
|
||||
@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
TradeOrderSummaryRespVO selectPaySummaryByPayStatusAndPayTimeBetween(@Param("payStatus") Integer payStatus,
|
||||
@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
}
|
||||
|
@ -75,8 +75,8 @@ public class TradeOrderStatisticsServiceImpl implements TradeOrderStatisticsServ
|
||||
|
||||
private TradeOrderSummaryRespVO getPayPriceSummary(LocalDateTime date) {
|
||||
LocalDateTime beginTime = LocalDateTimeUtil.beginOfDay(date);
|
||||
LocalDateTime endTime = LocalDateTimeUtil.beginOfDay(date);
|
||||
return tradeOrderStatisticsMapper.selectPaySummaryByStatusAndPayTimeBetween(
|
||||
LocalDateTime endTime = LocalDateTimeUtil.endOfDay(date);
|
||||
return tradeOrderStatisticsMapper.selectPaySummaryByPayStatusAndPayTimeBetween(
|
||||
PayOrderStatusEnum.SUCCESS.getStatus(), beginTime, endTime);
|
||||
}
|
||||
|
||||
|
@ -93,12 +93,12 @@
|
||||
AND deleted = FALSE
|
||||
</select>
|
||||
|
||||
<select id="selectPaySummaryByStatusAndPayTimeBetween"
|
||||
<select id="selectPaySummaryByPayStatusAndPayTimeBetween"
|
||||
resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeOrderSummaryRespVO">
|
||||
SELECT IFNULL(SUM(pay_price), 0) AS orderPayPrice,
|
||||
COUNT(1) AS orderPayCount
|
||||
FROM trade_order
|
||||
WHERE status = #{status}
|
||||
WHERE pay_status = #{payStatus}
|
||||
AND pay_time BETWEEN #{beginTime} AND #{endTime}
|
||||
AND deleted = FALSE
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user