refactor: 父级菜单查询时结果显示自己与自己的子项
This commit is contained in:
parent
0ba1bcd726
commit
09b26e9308
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue