pull/1121/head
梁宇奇 2025-08-15 16:30:53 +08:00
parent b18b5c4817
commit 32b07e7a6c
2 changed files with 7 additions and 8 deletions

View File

@ -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:

View File

@ -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);