diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java index 656eebfd..b28a36cc 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java @@ -395,8 +395,8 @@ public class OrderServiceImpl implements OrderService { // 计算子订单退款金额。 if (order.getPayPrice().compareTo(new BigDecimal("0")) == 1) { BigDecimal ratio = childOrder.getTotalActualPrice() - .divide(order.getPayPrice(), 2, BigDecimal.ROUND_DOWN).setScale(2); - childOrder.setSurplusRefundPrice(order.getPayPrice().multiply(ratio).setScale(2)); + .divide(order.getTotalPrice(), 2, BigDecimal.ROUND_DOWN).setScale(2); + childOrder.setSurplusRefundPrice(order.getPayPrice().multiply(ratio).setScale(2, BigDecimal.ROUND_DOWN)); } else { childOrder.setSurplusRefundPrice(new BigDecimal("0"));