diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index d06f7a13f..98c85c9da 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -3119,14 +3119,16 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { // 记录支订单付流水 List payRecordList = Lists.newArrayList(); for (BalanceDeductionAmountVO balanceDeductionAmountVO : list) { + String paymentId = balanceDeductionAmountVO.getPaymentId(); + BigDecimal deductionAmount = balanceDeductionAmountVO.getDeductionAmount(); JSONObject json = new JSONObject(); - json.put("paymentId", balanceDeductionAmountVO.getPaymentId()); - json.put("amount", balanceDeductionAmountVO.getDeductionAmount()); + json.put("paymentId", paymentId); + json.put("amount", deductionAmount); // 记录流水 payRecordList.add(OrderPayRecord.builder() .orderCode(orderCode) .payMode(OrderPayRecordEnum.PRINCIPAL_BALANCE_PAYMENT.getValue()) - .payAmount(balanceDeductionAmountVO.getDeductionAmount()) + .payAmount(deductionAmount) .acquirer(AcquirerEnum.LOCAL.getValue()) .deductionRecord(json.toJSONString()) .createBy(dto.getMemberId()) @@ -3135,6 +3137,14 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { // 订单支付流水入库 if (CollectionUtils.isNotEmpty(payRecordList)) { orderPayRecordService.batchInsert(payRecordList); + for (OrderPayRecord record : payRecordList) { + String deductionRecord = record.getDeductionRecord(); + JSONObject jsonObject = JSON.parseObject(deductionRecord); + String paymentId = jsonObject.getString("paymentId"); + BigDecimal amount = jsonObject.getBigDecimal("amount"); + // 余额支付 临时冻结金额 + memberAdapayRecordService.updateFreezeAmount(paymentId, amount); + } } // 余额支付可以直接调支付回调方法