diff --git a/Store.SyncLogistics/Models/BuyModels.cs b/Store.SyncLogistics/Models/BuyModels.cs index 6c6a1a9..7cea25f 100644 --- a/Store.SyncLogistics/Models/BuyModels.cs +++ b/Store.SyncLogistics/Models/BuyModels.cs @@ -295,7 +295,7 @@ public class BuyResultItem public string KuaidiSn { get; set; } /// - /// 快递状态:2待揽件 3已揽件 + /// 快递状态:2待揽件 3已揽件,4出单失败 /// public string Status { get; set; } diff --git a/Store.SyncLogistics/Services/VirtualLogisticsService.cs b/Store.SyncLogistics/Services/VirtualLogisticsService.cs index 2251af3..a025f64 100644 --- a/Store.SyncLogistics/Services/VirtualLogisticsService.cs +++ b/Store.SyncLogistics/Services/VirtualLogisticsService.cs @@ -158,10 +158,13 @@ public class VirtualLogisticsService : ITransientDependency throw new Exception("购买同步单失败"); } - List yhSyncs = new List(); foreach (var sync in ret.Data) { + if (string.IsNullOrEmpty(sync.KuaidiSn)) + { + throw new Exception($"获取快递单号为空,Status:{sync.Status}"); + } yhSyncs.Add(new YhSyncLogisticsEntity { OrderId = sync.OrderSn,