充值金额
This commit is contained in:
@@ -138,16 +138,21 @@ public class ShopOrderStatisticServiceImpl extends ServiceImpl<ShopOrderStatisti
|
|||||||
result.setProductCostAmount(productCostAmount);
|
result.setProductCostAmount(productCostAmount);
|
||||||
|
|
||||||
//会员充值退款 充值退款金额(线上退款+现金退款)
|
//会员充值退款 充值退款金额(线上退款+现金退款)
|
||||||
BigDecimal onlineAmount = Objects.requireNonNullElse(
|
BigDecimal cashRechargeAmount = Objects.requireNonNullElse(result.getCashRechargeAmount(), BigDecimal.ZERO);
|
||||||
|
BigDecimal onlineRechargeAmount = Objects.requireNonNullElse(result.getOnlineRechargeAmount(), BigDecimal.ZERO);
|
||||||
|
BigDecimal rechargeAmount = cashRechargeAmount.add(onlineRechargeAmount);
|
||||||
|
result.setRechargeAmount(rechargeAmount);
|
||||||
|
//会员充值退款 充值退款金额(线上退款+现金退款)
|
||||||
|
BigDecimal onlineRefundAmount = Objects.requireNonNullElse(
|
||||||
(onlineStat != null) ? onlineStat.getOnlineRechargeRefundAmount() : null,
|
(onlineStat != null) ? onlineStat.getOnlineRechargeRefundAmount() : null,
|
||||||
BigDecimal.ZERO
|
BigDecimal.ZERO
|
||||||
);
|
);
|
||||||
BigDecimal userFlowAmount = Objects.requireNonNullElse(
|
BigDecimal userFlowRefundAmount = Objects.requireNonNullElse(
|
||||||
(userFlowStat != null) ? userFlowStat.getCashRechargeRefundAmount() : null,
|
(userFlowStat != null) ? userFlowStat.getCashRechargeRefundAmount() : null,
|
||||||
BigDecimal.ZERO
|
BigDecimal.ZERO
|
||||||
);
|
);
|
||||||
BigDecimal total = onlineAmount.add(userFlowAmount);
|
BigDecimal rechargeRefundAmountTotal = onlineRefundAmount.add(userFlowRefundAmount);
|
||||||
result.setRechargeRefundAmount(total);
|
result.setRechargeRefundAmount(rechargeRefundAmountTotal);
|
||||||
//实付金额 (线上付款 现金支付 会员支付 挂账)
|
//实付金额 (线上付款 现金支付 会员支付 挂账)
|
||||||
BigDecimal onlinePayAmount = (onlineStat != null)
|
BigDecimal onlinePayAmount = (onlineStat != null)
|
||||||
? Objects.requireNonNullElse(onlineStat.getOnlinePayAmount(), BigDecimal.ZERO)
|
? Objects.requireNonNullElse(onlineStat.getOnlinePayAmount(), BigDecimal.ZERO)
|
||||||
|
|||||||
Reference in New Issue
Block a user