板块增加充值金额

This commit is contained in:
2026-02-04 16:07:26 +08:00
parent 04d75589a8
commit 7b9dcafc53

View File

@@ -70,7 +70,7 @@ public class ShopOrderStatisticServiceImpl extends ServiceImpl<ShopOrderStatisti
}
if (day <= 1) {
return List.of(onlineDataAmount);
}else {
} else {
startDate = currentDate.minusDays(day - 1);
}
List<TotalVo> statDateRange = mapper.getStatDateRange(shopId, startDate, currentDate);
@@ -84,7 +84,7 @@ public class ShopOrderStatisticServiceImpl extends ServiceImpl<ShopOrderStatisti
if (day <= 1) {
Map<String, BigDecimal> onlinePayTypeDate = mapper.getOnlinePayTypeDate(shopId, currentDate);
return CountPayTypeVo.realTimeDataByDay(onlinePayTypeDate);
}else {
} else {
startDate = currentDate.minusDays(day - 1);
}
return CountPayTypeVo.mergePayTypeData(
@@ -104,7 +104,7 @@ public class ShopOrderStatisticServiceImpl extends ServiceImpl<ShopOrderStatisti
}
if (day <= 1) {
return List.of(onlineProfitRateBarChart);
}else {
} else {
startDate = currentDate.minusDays(day - 1);
}
List<ProfitRateVO> statDateRange = mapper.profitRateBarChart(shopId, startDate, currentDate);
@@ -180,10 +180,11 @@ public class ShopOrderStatisticServiceImpl extends ServiceImpl<ShopOrderStatisti
result.setTableCount(Optional.ofNullable(tableCount).orElse(0L));
result.setProductCostAmount(Optional.ofNullable(productCostAmount).orElse(BigDecimal.ZERO));
//会员充值退款 充值退款金额(线上退款+现金退款
//会员充值金额(线上充值+现金充值+霸王餐充值
BigDecimal cashRechargeAmount = Objects.requireNonNullElse(result.getCashRechargeAmount(), BigDecimal.ZERO);
BigDecimal onlineRechargeAmount = Objects.requireNonNullElse(result.getOnlineRechargeAmount(), BigDecimal.ZERO);
BigDecimal rechargeAmount = cashRechargeAmount.add(onlineRechargeAmount);
BigDecimal freeRechargeAmount = Objects.requireNonNullElse(onlineStat != null ? onlineStat.getBackDiscountAmount() : null, BigDecimal.ZERO);
BigDecimal rechargeAmount = cashRechargeAmount.add(onlineRechargeAmount).add(freeRechargeAmount);
result.setRechargeAmount(rechargeAmount);
//会员充值退款 充值退款金额(线上退款+现金退款)
BigDecimal onlineRechargeRefundAmount = Objects.requireNonNullElse(