From c54a07ad406adb1dc1422dc6ac28f1d4e27c669f Mon Sep 17 00:00:00 2001 From: Lemon Date: Tue, 16 Sep 2025 15:47:15 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=80=80=E6=AC=BE=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E4=BF=9D=E9=99=A9=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index b25ce0532..98155fc1a 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -1984,6 +1984,11 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService { } } + // 判断订单是否购买保险 + if (orderBasicInfo.getInsuranceAmount().compareTo(BigDecimal.ZERO) > 0) { + // 如果购买保险,则退款金额需要再减去保险金额 + orderRefundAmount = orderRefundAmount.subtract(orderBasicInfo.getInsuranceAmount()); + } // 校验通过,将退款金额重新set(为了避免数据库的退款金额没有及时更新) orderBasicInfo.setRefundAmount(orderRefundAmount); afterSettleOrderDTO.setOrderBasicInfo(orderBasicInfo);