diff --git a/HKLib/Interfaces/HKLibHelper.cs b/HKLib/Interfaces/HKLibHelper.cs index 6fea82d..e424273 100644 --- a/HKLib/Interfaces/HKLibHelper.cs +++ b/HKLib/Interfaces/HKLibHelper.cs @@ -78,14 +78,14 @@ namespace HKLib.Interfaces public static List GetOrg() { - var data = IHttpMultiClient.HttpMulti - - .AddNode(t => + var data = IHttpMultiClient.HttpMulti.AddNode(t => { t.NodePath = $"{Configer.SaasRoute}api/one-card/member-tag-list"; t.ReqType = MultiType.GET; - }).Build().RunStringFirst().ToModel()["data"]["data"].ToJson().ToModel>(); - return data.Where(t => !t.Name.IsNullOrEmpty()).Select(t => new OrgDto + }).Build().RunStringFirst(); + if (data.IsNullOrEmpty()) return new List(); + var model =data.ToModel()["data"]["data"].ToJson().ToModel>(); + return model.Where(t => !t.Name.IsNullOrEmpty()).Select(t => new OrgDto { Name = t.Name, SId = t.Id