Kaynağa Gözat

优化DHL提示

FLH 2 ay önce
ebeveyn
işleme
89df247663

+ 6 - 1
3.Service/XYY.Service.Standard.ChannelApi/DeDhl/DeDhlApi.cs

@@ -121,7 +121,12 @@ namespace XYY.Service.Standard.ChannelApi.DeDhl
                 var resultData = Newtonsoft.Json.JsonConvert.DeserializeObject<ResultData>(response.Content);
                 if (resultData == null)
                     throw new Exception("下家服务器访问异常");
-                throw new Exception(resultData.status.detail);
+                var list = resultData.items?.SelectMany(x => x.validationMessages?.Select(y => y?.validationMessage));
+                string msgJoin = resultData.status.detail;
+
+                if (list != null)
+                    msgJoin += string.Join(',', list);
+                throw new Exception( msgJoin);
             }
             //var request = new HttpRequestMessage
             //{

+ 19 - 0
3.Service/XYY.Service.Standard.ChannelApi/DeDhl/ResultData.cs

@@ -75,6 +75,9 @@ namespace XYY.Service.Standard.ChannelApi.DeDhl
         /// 
         /// </summary>
         public Label label { get; set; }
+
+        public List<ValidationMessagesItem> validationMessages { get; set; }
+
     }
 
     public class ResultData
@@ -88,4 +91,20 @@ namespace XYY.Service.Standard.ChannelApi.DeDhl
         /// </summary>
         public List<LabelItem> items { get; set; }
     }
+
+    public class ValidationMessagesItem
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public string property { get; set; }
+        /// <summary>
+        /// 
+        /// </summary>
+        public string validationMessage { get; set; }
+        /// <summary>
+        /// 
+        /// </summary>
+        public string validationState { get; set; }
+    }
 }

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

@@ -483,6 +483,7 @@ namespace XYY.Service.Standard.ChannelApi.PSE
                     enName = x.Key.EnName,
                     quantity = x.Sum(y => y.Quantity),
                     hsCode = x.Key.HsCode,
+                    sku = x.Key.GoodsNumber,
                     singlePrice = x.Sum(y => y.Quantity * y.DeclareFee) / x.Sum(y => y.Quantity)
                 }).ToList();
             }

+ 1 - 0
3.Service/XYY.Service.Standard.ChannelApi/PSE/CreateOrderParam.cs

@@ -53,6 +53,7 @@ namespace XYY.Service.Standard.ChannelApi.PSE
         /// 
         /// </summary>
         public string hsCode { get; set; }
+        public string sku { get; set; }
     }
 
     public class OrderBagsItem