From 32b07e7a6c0fe7b5454918184ac8a672f8719a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E5=AE=87=E5=A5=87?= Date: Fri, 15 Aug 2025 16:30:53 +0800 Subject: [PATCH] fix --- ruoyi-admin/src/main/resources/application-dev.yml | 10 +++++----- .../ruoyi/xkt/manager/impl/ZtoExpressManagerImpl.java | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index e305d9ee4..db910376e 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -252,11 +252,11 @@ express: # 中通配置 zto: - appKey: 95dc4ecf72fce1a2fbe79 - appSecret: 694ea7e3ea89e3b6aa21aea1a0285d25 - gatewayUrl: https://japi-test.zto.com/ - accountId: test - accountPassword: ZTO123 + appKey: 1907975e6c6eadc096284 + appSecret: f67e08e72825d857495105c7ed78bf14 + gatewayUrl: https://japi.zto.com/ + accountId: ZTO761752114633049 + accountPassword: AJXVWZMM # 圆通配置 yto: diff --git a/xkt/src/main/java/com/ruoyi/xkt/manager/impl/ZtoExpressManagerImpl.java b/xkt/src/main/java/com/ruoyi/xkt/manager/impl/ZtoExpressManagerImpl.java index 92d3380de..a819ba45b 100644 --- a/xkt/src/main/java/com/ruoyi/xkt/manager/impl/ZtoExpressManagerImpl.java +++ b/xkt/src/main/java/com/ruoyi/xkt/manager/impl/ZtoExpressManagerImpl.java @@ -90,7 +90,7 @@ public class ZtoExpressManagerImpl implements ExpressManager, InitializingBean { if (success) { com.alibaba.fastjson2.JSONObject resultJson = bodyJson.getJSONObject("result"); String billCode = resultJson.getString("billCode"); - if (billCode != null){ + if (billCode != null) { ExpressShippingLabelDTO rtn = new ExpressShippingLabelDTO(shipReqDTO.getOriginContactName(), shipReqDTO.getOriginContactPhoneNumber(), shipReqDTO.getOriginProvinceName(), shipReqDTO.getOriginCityName(), shipReqDTO.getOriginCountyName(), @@ -260,8 +260,7 @@ public class ZtoExpressManagerImpl implements ExpressManager, InitializingBean { Assert.notEmpty(trackSubReq.getDestinationContactPhoneNumber()); ZtoSubTrackParam ztoSubTrackParam = new ZtoSubTrackParam(); ztoSubTrackParam.setBillCode(trackSubReq.getExpressWaybillNo()); - ztoSubTrackParam.setMobilePhone(StrUtil.sub(trackSubReq.getDestinationContactPhoneNumber(), - -1, 4)); + ztoSubTrackParam.setMobilePhone(StrUtil.subSufByLength(trackSubReq.getDestinationContactPhoneNumber(), 4)); ZopPublicRequest request = new ZopPublicRequest(); request.setBody(JSONUtil.toJsonStr(ztoSubTrackParam)); request.setUrl(gatewayUrl + TRACK_SUB_URI);