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