From d77f91b0f4ca93ee97229048c6f212c7442ca0ee Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 25 Oct 2022 14:44:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hai/order/service/impl/OrderServiceImpl.java | 1 + 1 file changed, 1 insertion(+) 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); // 计算子订单退款金额。