From 393827124414fd0ae35a4b638b915c9a47dd494c Mon Sep 17 00:00:00 2001 From: Lemon Date: Thu, 7 Mar 2024 10:40:10 +0800 Subject: [PATCH] =?UTF-8?q?update=20=20=E6=8E=A8=E9=80=81=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=81=9C=E6=AD=A2=E5=85=85=E7=94=B5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=87=91=E9=A2=9D=E6=94=B9=E4=B8=BA=E5=AE=9E=E4=BB=98?= =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/jsowell/pile/vo/uniapp/SendMessageVO.java | 5 +++++ .../com/jsowell/wxpay/service/WxAppletRemoteService.java | 6 +++++- .../src/main/resources/mapper/pile/OrderBasicInfoMapper.xml | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/vo/uniapp/SendMessageVO.java b/jsowell-pile/src/main/java/com/jsowell/pile/vo/uniapp/SendMessageVO.java index 54dcaaba9..3b324a06e 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/vo/uniapp/SendMessageVO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/vo/uniapp/SendMessageVO.java @@ -38,6 +38,11 @@ public class SendMessageVO { */ private String orderAmount; + /** + * 折扣金额 + */ + private String discountAmount; + /** * 结算金额 */ diff --git a/jsowell-pile/src/main/java/com/jsowell/wxpay/service/WxAppletRemoteService.java b/jsowell-pile/src/main/java/com/jsowell/wxpay/service/WxAppletRemoteService.java index 957962273..30fd3a86c 100644 --- a/jsowell-pile/src/main/java/com/jsowell/wxpay/service/WxAppletRemoteService.java +++ b/jsowell-pile/src/main/java/com/jsowell/wxpay/service/WxAppletRemoteService.java @@ -29,6 +29,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.io.IOException; +import java.math.BigDecimal; import java.text.ParseException; import java.util.Date; import java.util.HashMap; @@ -255,7 +256,10 @@ public class WxAppletRemoteService { AppletTemplateMessageSendDTO.StopChargingMessage stopChargingMessage = new AppletTemplateMessageSendDTO.StopChargingMessage(); msgInfo.setStopChargingMessage(stopChargingMessage); - stopChargingMessage.setChargingAmount(sendMessageVO.getSettleAmount()); // 订单金额 2024.03.05改为 结算金额 + BigDecimal orderAmount = new BigDecimal(sendMessageVO.getOrderAmount()); + BigDecimal discountAmount = new BigDecimal(sendMessageVO.getDiscountAmount()); + + stopChargingMessage.setChargingAmount(String.valueOf(orderAmount.subtract(discountAmount))); // 订单金额 2024.03.05改为 实付金额 stopChargingMessage.setEndReason(sendMessageVO.getStopReason()); // 结束原因 stopChargingMessage.setOrderCode(sendMessageVO.getOrderCode()); // 订单号 stopChargingMessage.setChargingDegree(sendMessageVO.getChargingDegree()); // 充电度数 diff --git a/jsowell-pile/src/main/resources/mapper/pile/OrderBasicInfoMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/OrderBasicInfoMapper.xml index 1bae1edce..a7a0544c8 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/OrderBasicInfoMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/OrderBasicInfoMapper.xml @@ -2459,6 +2459,8 @@ t1.station_id as stationId, t2.station_name as stationName, t3.total_order_amount as orderAmount, + t1.order_amount as orderAmount, + t1.discount_amount as discountAmount, t1.settle_amount as settleAmount, t3.total_used_electricity as chargingDegree, t4.open_id as openId