圆通生产联调

pull/1121/head
梁宇奇 2025-08-14 15:52:05 +08:00
parent 324e0c0f4c
commit aa4636c24b
2 changed files with 31 additions and 32 deletions

View File

@ -262,8 +262,8 @@ zto:
yto: yto:
appKey: K280280756 appKey: K280280756
appSecret: iplud2s6 appSecret: iplud2s6
appKey2: K280280756 appKey2: ZCBJ_STD
appSecret2: iplud2s6 appSecret2: xJa1tc2A
gatewayUrl: https://openapi.yto.net.cn:11443/ gatewayUrl: https://openapi.yto.net.cn:11443/
# 支付宝配置 # 支付宝配置

View File

@ -193,36 +193,35 @@ public class YtoExpressManagerImpl implements ExpressManager {
@Override @Override
public boolean subscribeTrack(ExpressTrackSubReqDTO trackSubReq) { public boolean subscribeTrack(ExpressTrackSubReqDTO trackSubReq) {
// Assert.notNull(trackSubReq.getExpressWaybillNo()); Assert.notNull(trackSubReq.getExpressWaybillNo());
// YtoSubTrackParam.LogisticsInterface logisticsInterface = new YtoSubTrackParam.LogisticsInterface(); YtoSubTrackParam.LogisticsInterface logisticsInterface = new YtoSubTrackParam.LogisticsInterface();
// logisticsInterface.setClientId(appKey2); logisticsInterface.setClientId(appKey2);
// logisticsInterface.setWaybillNo(trackSubReq.getExpressWaybillNo()); logisticsInterface.setWaybillNo(trackSubReq.getExpressWaybillNo());
// YtoSubTrackParam ytoSubTrackParam = new YtoSubTrackParam(); YtoSubTrackParam ytoSubTrackParam = new YtoSubTrackParam();
// ytoSubTrackParam.setClient_id(appKey2); ytoSubTrackParam.setClient_id(appKey2);
// ytoSubTrackParam.setMsg_type("online"); ytoSubTrackParam.setMsg_type("online");
// ytoSubTrackParam.setLogistics_interface(JSONUtil.toJsonStr(logisticsInterface)); ytoSubTrackParam.setLogistics_interface(JSONUtil.toJsonStr(logisticsInterface));
// try { try {
// String param = JSONUtil.toJsonStr(ytoSubTrackParam); String param = JSONUtil.toJsonStr(ytoSubTrackParam);
// String sign = YtoSignUtil.sign("subscribe_adapter", "v1", param, appSecret2); String sign = YtoSignUtil.sign("subscribe_adapter", "v1", param, appSecret2);
// YtoPublicRequest request = YtoPublicRequest.builder() YtoPublicRequest request = YtoPublicRequest.builder()
// .timestamp(System.currentTimeMillis()) .timestamp(System.currentTimeMillis())
// .param(param) .param(param)
// .format(YtoPublicRequest.EFormat.JSON) .format(YtoPublicRequest.EFormat.JSON)
// .sign(sign).build(); .sign(sign).build();
// String rtnStr = HttpUtil.post(gatewayUrl + "open/subscribe_adapter/v1/av7bfQ/" + appKey2, String rtnStr = HttpUtil.post(gatewayUrl + "open/subscribe_adapter/v1/av7bfQ/" + appKey2,
// JSONUtil.toJsonStr(request)); JSONUtil.toJsonStr(request));
// log.info("圆通轨迹订阅返回信息: {}", rtnStr); log.info("圆通轨迹订阅返回信息: {}", rtnStr);
// JSONObject rtnJson = JSONUtil.parseObj(rtnStr); JSONObject rtnJson = JSONUtil.parseObj(rtnStr);
// Boolean success = rtnJson.getBool("success"); Boolean success = rtnJson.getBool("success");
// if (BooleanUtil.isTrue(success)) { if (BooleanUtil.isTrue(success)) {
// return true; return true;
// } }
// } catch (Exception e) { } catch (Exception e) {
// log.error("圆通轨迹订阅异常", e); log.error("圆通轨迹订阅异常", e);
// } }
// log.warn("圆通轨迹订阅失败: {}", trackSubReq); log.warn("圆通轨迹订阅失败: {}", trackSubReq);
// return false; return false;
return true;
} }