From 28d9e5ae7a5a8bd6a163b2f10cf08a0cab0c52be Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Thu, 25 May 2023 15:19:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=B7=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/service/impl/OrderBasicInfoServiceImpl.java | 7 +++++++ 1 file changed, 7 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 fe16f860b..632b29e00 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 @@ -174,6 +174,12 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { } // 订单总消费金额 BigDecimal orderAmount = new BigDecimal(orderListVO.getOrderAmount()); + // 支付金额 + BigDecimal payAmount = new BigDecimal(orderListVO.getPayAmount()); + + if (orderAmount.compareTo(payAmount) > 0) { + orderAmount = payAmount; + } // 使用虚拟金额消费 金额 BigDecimal virtualAmount = BigDecimal.ZERO; @@ -215,6 +221,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { OrderBasicInfo build = OrderBasicInfo.builder() .id(Long.parseLong(orderListVO.getId())) .orderCode(orderListVO.getOrderCode()) + .orderAmount(orderAmount) .virtualAmount(virtualAmount) .settleAmount(settleAmount) .build();