| @@ -170,9 +170,9 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { | |||||
| Double paymentD = 1.0 * cardInfo.getSaleAmount() * record.getDeductionAmount() / cardInfo.getAmount(); | Double paymentD = 1.0 * cardInfo.getSaleAmount() * record.getDeductionAmount() / cardInfo.getAmount(); | ||||
| Integer payment = paymentD.intValue();//实际金额 | Integer payment = paymentD.intValue();//实际金额 | ||||
| int iChargeFee = PayUtils.getPayRate(payment, payAccount.getRealRate(), false); | 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)) { | if (remaingAmount.equals(0)) { | ||||
| // 最后一次支付时 | // 最后一次支付时 | ||||
| real_payment = Math.min(real_payment, cardInfo.getRemainingShareFeeAmount()); | real_payment = Math.min(real_payment, cardInfo.getRemainingShareFeeAmount()); | ||||
| @@ -314,6 +314,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { | |||||
| } | } | ||||
| } | } | ||||
| //发消息 | |||||
| sendCardBalanceChange(coupon,record); | sendCardBalanceChange(coupon,record); | ||||
| if (null != orderUpdate.getCUserId() && (!Constant.defaultCUserId.equals(orderUpdate.getCUserId()))) { | if (null != orderUpdate.getCUserId() && (!Constant.defaultCUserId.equals(orderUpdate.getCUserId()))) { | ||||
| @@ -381,7 +382,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { | |||||
| Map<String,String> map = new HashMap<>(); | Map<String,String> map = new HashMap<>(); | ||||
| map.put("thing7",coupon.getTitle()); | map.put("thing7",coupon.getTitle()); | ||||
| map.put("amount1",cardSpend.getPaymentStr()); | |||||
| map.put("amount1",cardSpend.getDeductionAmountStr()); | |||||
| map.put("amount2",cardSpend.getCardRemainAmountStr()); | map.put("amount2",cardSpend.getCardRemainAmountStr()); | ||||
| map.put("date4",dateFormat.format(cardSpend.getCreateDate())); | map.put("date4",dateFormat.format(cardSpend.getCreateDate())); | ||||
| WxMerchant merchant = wxMerchantMapper.selectById(cardSpend.getMerchantId()); | WxMerchant merchant = wxMerchantMapper.selectById(cardSpend.getMerchantId()); | ||||