From 2b01d14ea53560f4aa2f1773ce90d30e61af105d Mon Sep 17 00:00:00 2001
From: 18650502300 <18650502300@163.com>
Date: Mon, 21 Oct 2024 09:33:52 +0800
Subject: [PATCH] =?UTF-8?q?1.=E5=90=88=E4=BC=99=E4=BA=BA=E5=88=86=E8=B4=A6?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/java/com/ruoyi/common/constant/ServiceConstants.java | 2 +-
.../com/ruoyi/system/service/impl/EtOrderServiceImpl.java | 4 ++--
.../src/main/resources/mapper/system/EtLocationLogMapper.xml | 1 +
.../src/main/resources/mapper/system/EtModelMapper.xml | 1 +
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/electripper-common/src/main/java/com/ruoyi/common/constant/ServiceConstants.java b/electripper-common/src/main/java/com/ruoyi/common/constant/ServiceConstants.java
index 5e48959..a666ac7 100644
--- a/electripper-common/src/main/java/com/ruoyi/common/constant/ServiceConstants.java
+++ b/electripper-common/src/main/java/com/ruoyi/common/constant/ServiceConstants.java
@@ -283,7 +283,7 @@ public class ServiceConstants {
public static final String VEHICLE_STATUS_OFFLINE = "0";
/**
- * 在线状态: 0-在线
+ * 在线状态: 1-在线
*/
public static final String VEHICLE_STATUS_ONLINE = "1";
diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java
index 526f36b..a22f5c6 100644
--- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java
+++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java
@@ -535,7 +535,7 @@ public class EtOrderServiceImpl implements IEtOrderService
}
}else{
TmTradeInfo tradeInfo = paymentResult.getTradeInfo();
- if(PayStatus.isSuccess(tradeInfo.getPayStatus().getCode())) {
+ if(tradeInfo.getPayStatus()!=null && PayStatus.isSuccess(tradeInfo.getPayStatus().getCode())) {
handleSuccess(order);
return 1;
}else{
@@ -1859,7 +1859,7 @@ public class EtOrderServiceImpl implements IEtOrderService
if(ObjectUtil.isNotNull(ridingFee) && !ridingFee.equals(BigDecimal.ZERO)){
refundAmount = refundAmount.add(ridingFee);
}
- BigDecimal refundPercentage = refundAmount.divide(etOrder1.getPayFee()).setScale(2, RoundingMode.HALF_UP);// 0.33
+ BigDecimal refundPercentage = refundAmount.divide(etOrder1.getPayFee(), 2, RoundingMode.HALF_UP);// 0.33
// 合伙人退款
BigDecimal totalPartnerDividend = partnerRefund(etOrder, etOrder1, refundPercentage);
log.info("【合伙人退款】:总金额【{}】", totalPartnerDividend);
diff --git a/electripper-system/src/main/resources/mapper/system/EtLocationLogMapper.xml b/electripper-system/src/main/resources/mapper/system/EtLocationLogMapper.xml
index 6400477..a3a7eef 100644
--- a/electripper-system/src/main/resources/mapper/system/EtLocationLogMapper.xml
+++ b/electripper-system/src/main/resources/mapper/system/EtLocationLogMapper.xml
@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and status = #{status}
and lock_status = #{lockStatus}
+ order by create_time desc