From b654fcb3737f6f75957dcee1b3f10a3c77f45373 Mon Sep 17 00:00:00 2001 From: xhxu Date: Mon, 13 Mar 2023 16:31:17 +0800 Subject: [PATCH] //msg --- .../iformall/service/impl/WxCardSpendServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java index 0858c61be..46311138f 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java @@ -170,9 +170,9 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { Double paymentD = 1.0 * cardInfo.getSaleAmount() * record.getDeductionAmount() / cardInfo.getAmount(); Integer payment = paymentD.intValue();//实际金额 int iChargeFee = PayUtils.getPayRate(payment, payAccount.getRealRate(), false); - Integer real_payment = payment - iChargeFee; - Integer remain_real_pament = cardInfo.getRemainingShareFeeAmount() - real_payment; - Integer remaingAmount = cardInfo.getRemainingAmount() - record.getDeductionAmount(); + Integer real_payment = payment - iChargeFee;//分账金额 + Integer remain_real_pament = cardInfo.getRemainingShareFeeAmount() - real_payment;//分账剩余金额 + Integer remaingAmount = cardInfo.getRemainingAmount() - record.getDeductionAmount();//剩余面额 if (remaingAmount.equals(0)) { // 最后一次支付时 real_payment = Math.min(real_payment, cardInfo.getRemainingShareFeeAmount()); @@ -314,6 +314,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { } } + //发消息 sendCardBalanceChange(coupon,record); if (null != orderUpdate.getCUserId() && (!Constant.defaultCUserId.equals(orderUpdate.getCUserId()))) { @@ -381,7 +382,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { Map map = new HashMap<>(); map.put("thing7",coupon.getTitle()); - map.put("amount1",cardSpend.getPaymentStr()); + map.put("amount1",cardSpend.getDeductionAmountStr()); map.put("amount2",cardSpend.getCardRemainAmountStr()); map.put("date4",dateFormat.format(cardSpend.getCreateDate())); WxMerchant merchant = wxMerchantMapper.selectById(cardSpend.getMerchantId());