refactor: 父级菜单查询时结果显示自己与自己的子项

This commit is contained in:
Argo 2019-07-18 16:43:50 +08:00
parent 0ba1bcd726
commit 09b26e9308
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
using Bootstrap.DataAccess;
using Bootstrap.DataAccess;
using Longbow.Web.Mvc;
using System;
using System.Linq;
@ -45,7 +45,7 @@ namespace Bootstrap.Admin.Query
var data = MenuHelper.RetrieveMenusByUserName(userName);
if (!string.IsNullOrEmpty(ParentName))
{
data = data.Where(t => t.ParentName != null && t.ParentName.Contains(ParentName));
data = data.Where(t => t.Name.Contains(ParentName) || (t.ParentName != null && t.ParentName.Contains(ParentName)));
}
if (!string.IsNullOrEmpty(Name))
{
@ -107,4 +107,4 @@ namespace Bootstrap.Admin.Query
return ret;
}
}
}
}