From c11c2de893c3f05056094493a4e9e37e27acd5fd Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Sat, 12 Oct 2024 01:40:46 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/common/pay/tm/enums/PayStatus.java | 2 +- .../com/ruoyi/system/service/impl/AsDeviceServiceImpl.java | 6 +++--- .../com/ruoyi/system/service/impl/CallbackServiceImpl.java | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/electripper-common/src/main/java/com/ruoyi/common/pay/tm/enums/PayStatus.java b/electripper-common/src/main/java/com/ruoyi/common/pay/tm/enums/PayStatus.java index ec1b55a..d259fdb 100644 --- a/electripper-common/src/main/java/com/ruoyi/common/pay/tm/enums/PayStatus.java +++ b/electripper-common/src/main/java/com/ruoyi/common/pay/tm/enums/PayStatus.java @@ -14,7 +14,7 @@ public enum PayStatus { SUCCESS("SUCCESS", "支付成功"), NOTPAY("NOTPAY", "未支付"), - CLOSE("CLOSE", "已关闭"), + CLOSE("CLOSED", "已关闭"), REVOKED("REVOKED", "已撤销"), USERPAYING("USERPAYING", "用户支付中"), PAYERROR("PAYERROR", "支付失败"), diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/AsDeviceServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/AsDeviceServiceImpl.java index 1c430d2..a88c4aa 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/AsDeviceServiceImpl.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/AsDeviceServiceImpl.java @@ -1787,10 +1787,10 @@ public class AsDeviceServiceImpl extends ServiceImpl i throw new ServiceException("该订单状态非骑行中"); } EtOperatingArea area = etOperatingAreaService.selectEtOperatingAreaByAreaId(order.getAreaId()); - if(ServiceConstants.RETURN_VERIFY_YES.equals(area.getReturnVerify()) && StrUtil.isBlank(order.getVideoUrl())){ - throw new ServiceException("请先拍摄还车视频!"); - } if(ServiceConstants.RETURN_TYPE_NORMAL.equals(returnType)){ + if(ServiceConstants.RETURN_VERIFY_YES.equals(area.getReturnVerify()) && StrUtil.isBlank(order.getVideoUrl())){ + throw new ServiceException("请先拍摄还车视频!"); + } //判断是否在禁停区内,如果在禁停区内,不能还车。 noParkingArea if(isNoParkingArea(order.getSn(), order.getAreaId())){ throw new ServiceException("在禁停区内,不能还车"); diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/CallbackServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/CallbackServiceImpl.java index 5409616..1201b0c 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/CallbackServiceImpl.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/CallbackServiceImpl.java @@ -185,6 +185,9 @@ public class CallbackServiceImpl implements CallbackService { public void businessHandle(String outTradeNo,AttachVo attachVo,String payType) { // 充值成功后的业务处理 EtOrder order = orderService.selectEtOrderByOutTradeNo(outTradeNo); + if(order.getPaid().equals(ServiceConstants.ORDER_PAY_STATUS_PAID)){ + return; + } EtOrder order1 = new EtOrder(); order1.setOrderId(order.getOrderId()); logger.info("【微信/太米支付回调】订单信息 : " + JSON.toJSONString(order));