Browse Source

ubi跟踪号更新

FLH 2 days ago
parent
commit
50a19407f9

+ 1 - 1
3.Service/XYY.Service.Standard.ChannelApi/JD/Api.cs

@@ -366,7 +366,7 @@ namespace XYY.Service.Standard.ChannelApi.JD
         private async Task<UploadResult> RequestLabel(JDConfig config, string serviceOrderNumber, string orderNumber)
         {
             var printDto = CreateWaybillPrintDTO(config.customerCode, config.pin, orderNumber);
-            RequestInfo requestInfo = CreateRequestInfo();
+            RequestInfo requestInfo = CreateRequestInfo(config);
             RestRequest request = CreateRestRequst(requestInfo, printDto, out string paramJson);
             string method = "jingdong.fop.waybill.printWaybill";
             RestClient client = createRestClient(method, paramJson, config);

+ 4 - 3
3.Service/XYY.Service.Standard.ChannelApi/UBI/Api.cs

@@ -612,7 +612,7 @@ namespace XYY.Service.Standard.ChannelApi.UBI
             /// <summary>
             /// 
             /// </summary>
-            public List<DataItem> data { get; set; }
+            public List<GetTrackingResultItem> data { get; set; }
             /// <summary>
             /// 
             /// </summary>
@@ -625,7 +625,7 @@ namespace XYY.Service.Standard.ChannelApi.UBI
         }
         public async Task<string> GetTrackingNumber(string SystemNo, string TrackingNumber, string ServiceOrderNo, Logistics_Channel channel)
         {
-            string str = await Send(channel, new string[] { TrackingNumber }, "Post", "/services/shippping/trackingNumbers");
+            string str = await Send(channel, new string[] { TrackingNumber }, "POST", "/services/shipper/trackingNumbers");
             GetTrackingResult trackingResult = Newtonsoft.Json.JsonConvert.DeserializeObject<GetTrackingResult>(str);
             if (trackingResult.status == "Success")
             {
@@ -633,7 +633,8 @@ namespace XYY.Service.Standard.ChannelApi.UBI
                 {
                     if (trackingResult.data[0].status == "Success")
                     {
-                        return trackingResult.data[0].trackingNo;
+                        if (trackingResult.data[0].relabelStatus == 2)
+                            return trackingResult.data[0].trackingNo;
                     }
                 }
             }