From 5a0a8d8c0201469c66d0b3d439d53623dcab0b78 Mon Sep 17 00:00:00 2001 From: chfei Date: Thu, 24 Sep 2026 18:15:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BF=AB=E9=80=92=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=20=E6=97=A0=E5=BF=AB=E9=80=92=E5=8D=95=E5=8F=B7?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Store.SyncLogistics/Models/BuyModels.cs | 2 +- Store.SyncLogistics/Services/VirtualLogisticsService.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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,