update 计算退款金额

This commit is contained in:
2023-09-14 17:41:14 +08:00
parent 74cf20b8a5
commit 28e5a51d88

View File

@@ -437,9 +437,9 @@ public abstract class AbstractOrderLogic implements InitializingBean {
map.put("unfreezeAmount", unfreezeAmount);
resultList.add(map);
} else {
BigDecimal refundPerPayment = tempAmount.min(payAmount);
unfreezeAmount = payAmount.subtract(refundPerPayment);
tempAmount = tempAmount.subtract(refundPerPayment);
BigDecimal min = tempAmount.min(payAmount);
unfreezeAmount = payAmount.subtract(min);
tempAmount = tempAmount.subtract(min);
Map<String, Object> map = Maps.newHashMap();
map.put("paymentId", paymentId);
map.put("unfreezeAmount", unfreezeAmount);