From 9dc01f6057da85a3829285da0b5c5b6e249626ef Mon Sep 17 00:00:00 2001 From: fengtianyangyang Date: Mon, 18 Apr 2022 19:09:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E7=BB=93=E7=AE=97=E5=8D=95?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/serviceimpl/StoreFlowServiceImpl.java | 6 ++++++ .../cn/lili/modules/store/mapper/BillMapper.java | 2 +- .../modules/store/serviceimpl/BillServiceImpl.java | 12 ++++++------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/StoreFlowServiceImpl.java b/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/StoreFlowServiceImpl.java index 8dda9a15..e4707a3f 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/StoreFlowServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/StoreFlowServiceImpl.java @@ -180,6 +180,12 @@ public class StoreFlowServiceImpl extends ServiceImpl { */ @Select("SELECT SUM( final_price ) AS refundPrice,SUM( commission_price ) AS refundCommissionPrice" + ",SUM( distribution_rebate ) AS distributionRefundCommission,SUM( site_coupon_commission ) AS siteCouponRefundCommission" + - ",SUM( bill_price ) AS billPrice FROM li_store_flow ${ew.customSqlSegment}") + ",SUM( final_price ) AS billPrice FROM li_store_flow ${ew.customSqlSegment}") Bill getRefundBill(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); } \ No newline at end of file diff --git a/framework/src/main/java/cn/lili/modules/store/serviceimpl/BillServiceImpl.java b/framework/src/main/java/cn/lili/modules/store/serviceimpl/BillServiceImpl.java index 5cf4338b..d74c4339 100644 --- a/framework/src/main/java/cn/lili/modules/store/serviceimpl/BillServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/store/serviceimpl/BillServiceImpl.java @@ -103,7 +103,7 @@ public class BillServiceImpl extends ServiceImpl implements Bi //分销订单退还,返现佣金返还 bill.setDistributionRefundCommission(refundBill.getDistributionRefundCommission()); //退货平台优惠券补贴返还 - bill.setSiteCouponRefundCommission(refundBill.getSiteCouponRefundCommission()); + bill.setSiteCouponRefundCommission(refundBill.getSiteCouponRefundCommission()!=null?refundBill.getSiteCouponRefundCommission():0D); //退款金额=店铺最终退款结算金额 refundPrice = refundBill.getBillPrice(); } @@ -132,16 +132,16 @@ public class BillServiceImpl extends ServiceImpl implements Bi bill.setPointSettlementPrice(orderBill.getPointSettlementPrice()); //砍价商品结算价格 bill.setKanjiaSettlementPrice(orderBill.getKanjiaSettlementPrice()); - //入款结算金额= 店铺支付结算金额 + 平台优惠券补贴 + 退单产生退还佣金金额 + 分销订单退还,返现佣金返还+退货平台优惠券补贴返还 + + //入款结算金额= 店铺支付结算金额 + 平台优惠券补贴 + 分销订单退还,返现佣金返还+退单产生退还佣金金额 orderPrice = CurrencyUtil.add(orderBill.getBillPrice(), bill.getSiteCouponCommission(), - bill.getRefundCommissionPrice(), bill.getDistributionRefundCommission(), - bill.getSiteCouponRefundCommission()); + bill.getRefundCommissionPrice()); } - //最终结算金额=入款结算金额-退款结算金额- - Double finalPrice = CurrencyUtil.sub(orderPrice, refundPrice); + //最终结算金额=入款结算金额-退款结算金额-退货平台优惠券补贴返还 + Double finalPrice = CurrencyUtil.sub(orderPrice, refundPrice,bill.getSiteCouponRefundCommission()); //店铺最终结算金额=最终结算金额 bill.setBillPrice(finalPrice);