提交代码

dev-discount
胡锐 2 years ago
parent 3180a8bcad
commit 06cb2ddc25
  1. 4
      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"));

Loading…
Cancel
Save