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 17008b95..905dfd93 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 @@ -393,6 +393,7 @@ public class OrderServiceImpl implements OrderService { childOrder.setOrderNo(order.getOrderNo()); childOrder.setSurplusRefundNum(childOrder.getSaleCount()); + // 计算 子订单 在交易订单金额中的占比 BigDecimal ratio = childOrder.getGoodsPrice().divide(order.getTotalPrice(), 2, BigDecimal.ROUND_DOWN).setScale(2); // 计算子订单退款金额。