From 6e83abf8d011829355ca1edd16a095a1c51b51da Mon Sep 17 00:00:00 2001
From: zhangqi <2794379662@qq.com>
Date: Tue, 27 Apr 2021 17:45:19 +0800
Subject: [PATCH] =?UTF-8?q?update:=E6=A0=91=E8=8A=82=E7=82=B9=E5=B7=A5?=
=?UTF-8?q?=E5=85=B7=E6=A0=B9=E8=8A=82=E7=82=B9=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Api/Ewide.Core/Util/TreeBuildUtil.cs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Api/Ewide.Core/Util/TreeBuildUtil.cs b/Api/Ewide.Core/Util/TreeBuildUtil.cs
index aefd91c..d68ab46 100644
--- a/Api/Ewide.Core/Util/TreeBuildUtil.cs
+++ b/Api/Ewide.Core/Util/TreeBuildUtil.cs
@@ -1,4 +1,5 @@
-using System.Collections;
+using System;
+using System.Collections;
using System.Collections.Generic;
namespace Ewide.Core
@@ -36,7 +37,7 @@ namespace Ewide.Core
///
/// 顶级节点的父节点Id(默认0)
///
- private readonly string _rootParentId = System.Guid.Empty.ToString().ToLower();
+ private readonly List _rootParentIds = new List {string.Empty,Guid.Empty.ToString() };
///
/// 构造树节点
@@ -50,7 +51,7 @@ namespace Ewide.Core
var results = new List();
nodes.ForEach(u =>
{
- if (_rootParentId == u.GetPid())
+ if (_rootParentIds.Contains(u.GetPid()))
results.Add(u);
});
return results;