提交 095f48ff 编写于 作者: sq3536's avatar sq3536

排除空节点

上级 64700eb4
......@@ -144,16 +144,14 @@ public class SysStructure
if(this.getApps()!=null)
{
this.getApps().forEach(app->{
PermissionNode appNode = PermissionNode.builder()
.label("应用-"+app.getAppname()).build()
.setUniKey(systemid, app.getAppid());
if(app.getAppmenus()!=null)
{
app.getAppmenus().forEach(appmenu->{
PermissionNode appMenuNode = PermissionNode.builder()
.label("菜单-"+appmenu.getMenuname()).build()
.setUniKey(systemid, appmenu.getMenuid());
.label("应用-"+app.getAppname()+"菜单-"+appmenu.getMenuname()).build()
.setUniKey(systemid, app.getAppid()+"-"+appmenu.getMenuid());
if(appmenu.getMenuitems()!=null)
{
......@@ -162,11 +160,10 @@ public class SysStructure
});
}
appNode.getChildren().add(appMenuNode);
root.getChildren().add(appMenuNode);
});
}
root.getChildren().add(appNode);
});
}
break;
......
......@@ -56,9 +56,15 @@ public class UAACoreService {
page.getContent().forEach(system->{
if(system.getSysstructure()==null)
return;
apps.add(system.getSysstructure().getPermissionTree(PermissionType.APPMENU));
uniResIds.add(system.getSysstructure().getPermissionTree(PermissionType.UNIRES));
oppirvs.add(system.getSysstructure().getPermissionTree(PermissionType.OPPRIV));
PermissionNode appnode=system.getSysstructure().getPermissionTree(PermissionType.APPMENU);
if(appnode.getChildren().size()>0)
apps.add(appnode);
PermissionNode uniresnode=system.getSysstructure().getPermissionTree(PermissionType.UNIRES);
if(uniresnode.getChildren().size()>0)
uniResIds.add(uniresnode);
PermissionNode opprivnode=system.getSysstructure().getPermissionTree(PermissionType.OPPRIV);
if(opprivnode.getChildren().size()>0)
oppirvs.add(opprivnode);
});
Map<String,List<PermissionNode>> map = new HashMap<>();
map.put(PermissionType.APPMENU.toString(),apps);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册