From 6b3ebbcd733b84976040aa8bdc9f8a5b39aea042 Mon Sep 17 00:00:00 2001 From: xxe Date: Sat, 15 Oct 2022 13:49:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HKLib/Interfaces/HKLibHelper.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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