|
|
@ -395,8 +395,8 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
// 计算子订单退款金额。
|
|
|
|
// 计算子订单退款金额。
|
|
|
|
if (order.getPayPrice().compareTo(new BigDecimal("0")) == 1) { |
|
|
|
if (order.getPayPrice().compareTo(new BigDecimal("0")) == 1) { |
|
|
|
BigDecimal ratio = childOrder.getTotalActualPrice() |
|
|
|
BigDecimal ratio = childOrder.getTotalActualPrice() |
|
|
|
.divide(order.getPayPrice(), 2, BigDecimal.ROUND_DOWN).setScale(2); |
|
|
|
.divide(order.getTotalPrice(), 2, BigDecimal.ROUND_DOWN).setScale(2); |
|
|
|
childOrder.setSurplusRefundPrice(order.getPayPrice().multiply(ratio).setScale(2)); |
|
|
|
childOrder.setSurplusRefundPrice(order.getPayPrice().multiply(ratio).setScale(2, BigDecimal.ROUND_DOWN)); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
childOrder.setSurplusRefundPrice(new BigDecimal("0")); |
|
|
|
childOrder.setSurplusRefundPrice(new BigDecimal("0")); |
|
|
|