升级组件:Bootstrap.Security.DataAccess组件升级到1.7优化层次化方法,提高性能,修复Issue #IRT80
This commit is contained in:
parent
b93d1fca79
commit
ba432a06b1
|
@ -11,7 +11,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.6.0" />
|
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.7.0" />
|
||||||
<PackageReference Include="Longbow.Cache" Version="2.2.3" />
|
<PackageReference Include="Longbow.Cache" Version="2.2.3" />
|
||||||
<PackageReference Include="Longbow.Web" Version="2.2.4" />
|
<PackageReference Include="Longbow.Web" Version="2.2.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -23,9 +23,7 @@ namespace Bootstrap.Client.DataAccess
|
||||||
public static IEnumerable<BootstrapMenu> RetrieveAppMenus(string userName, string activeUrl)
|
public static IEnumerable<BootstrapMenu> RetrieveAppMenus(string userName, string activeUrl)
|
||||||
{
|
{
|
||||||
var menus = RetrieveAllMenus(userName).Where(m => m.Category == "1" && m.IsResource == 0 && m.Application == ConfigurationManager.AppSettings["AppId"]).Where(m => m.ParentId == "0").OrderBy(m => m.Application).ThenBy(m => m.Order);
|
var menus = RetrieveAllMenus(userName).Where(m => m.Category == "1" && m.IsResource == 0 && m.Application == ConfigurationManager.AppSettings["AppId"]).Where(m => m.ParentId == "0").OrderBy(m => m.Application).ThenBy(m => m.Order);
|
||||||
var root = DbHelper.CascadeMenus(menus);
|
return DbHelper.CascadeMenus(menus, activeUrl);
|
||||||
DbHelper.ActiveMenu(root, activeUrl);
|
|
||||||
return root;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.6.0" />
|
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.7.0" />
|
||||||
<PackageReference Include="Longbow.Data" Version="2.2.5" />
|
<PackageReference Include="Longbow.Data" Version="2.2.5" />
|
||||||
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
|
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
|
||||||
<PackageReference Include="Longbow.Web" Version="2.2.4" />
|
<PackageReference Include="Longbow.Web" Version="2.2.4" />
|
||||||
|
|
|
@ -83,9 +83,7 @@ namespace Bootstrap.DataAccess
|
||||||
{
|
{
|
||||||
var menus = RetrieveAllMenus(userName).Where(m => m.Category == "1" && m.IsResource == 0);
|
var menus = RetrieveAllMenus(userName).Where(m => m.Category == "1" && m.IsResource == 0);
|
||||||
if (appId != "0") menus = menus.Where(m => m.Application == appId);
|
if (appId != "0") menus = menus.Where(m => m.Application == appId);
|
||||||
var root = DbHelper.CascadeMenus(menus);
|
return DbHelper.CascadeMenus(menus, activeUrl);
|
||||||
DbHelper.ActiveMenu(root, activeUrl);
|
|
||||||
return root;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -99,9 +97,7 @@ namespace Bootstrap.DataAccess
|
||||||
public static IEnumerable<BootstrapMenu> RetrieveSystemMenus(string userName, string activeUrl = null)
|
public static IEnumerable<BootstrapMenu> RetrieveSystemMenus(string userName, string activeUrl = null)
|
||||||
{
|
{
|
||||||
var menus = RetrieveAllMenus(userName).Where(m => m.Category == "0" && m.IsResource == 0);
|
var menus = RetrieveAllMenus(userName).Where(m => m.Category == "0" && m.IsResource == 0);
|
||||||
var root = DbHelper.CascadeMenus(menus);
|
return DbHelper.CascadeMenus(menus, activeUrl);
|
||||||
DbHelper.ActiveMenu(root, activeUrl);
|
|
||||||
return root;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue