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); map.put("unfreezeAmount", unfreezeAmount);
resultList.add(map); resultList.add(map);
} else { } else {
BigDecimal refundPerPayment = tempAmount.min(payAmount); BigDecimal min = tempAmount.min(payAmount);
unfreezeAmount = payAmount.subtract(refundPerPayment); unfreezeAmount = payAmount.subtract(min);
tempAmount = tempAmount.subtract(refundPerPayment); tempAmount = tempAmount.subtract(min);
Map<String, Object> map = Maps.newHashMap(); Map<String, Object> map = Maps.newHashMap();
map.put("paymentId", paymentId); map.put("paymentId", paymentId);
map.put("unfreezeAmount", unfreezeAmount); map.put("unfreezeAmount", unfreezeAmount);