help的getMenuList方法和需改为getMenuTreeList

pxy的doLog修改默认值为2
This commit is contained in:
duandongmei
2019-01-10 13:43:05 +06:00
parent 00140e3c0d
commit c76de86e3b
3 changed files with 62 additions and 57 deletions

View File

@@ -25,73 +25,78 @@ public class SystemController extends BaseController{
@RequestMapping("help")
public String help(HttpServletRequest request, HttpServletResponse response,ModelMap model){
List<SysMenu> menuList = UserUtils.getMenuList();
List<SysMenu> menuList = UserUtils.getMenuTreeList();
List<SysMenu> newList = new ArrayList();
for(SysMenu menu:menuList){
if(menu.getIsTop()==1 && !StringUtil.isEmpty(menu.getChildren())){
boolean topShow = false;
for(SysMenu second:menu.getChildren()){
boolean secondShow = false;
if(second.getIsShow()==1){
if(!StringUtil.isEmpty(second.getMenuBg())){
secondShow = true;
}
if(!StringUtil.isEmpty(second.getChildren())){
for(SysMenu third:second.getChildren()){
boolean thirdShow = false;
if(third.getIsShow()==1){
if(!StringUtil.isEmpty(third.getMenuBg())){
thirdShow = true;
secondShow = true;
}
if(!StringUtil.isEmpty(third.getChildren())){
for(SysMenu fourth:third.getChildren()){
if(!StringUtil.isEmpty(fourth.getMenuBg())&&fourth.getIsShow()==1){
newList.add(fourth);
thirdShow = true;
secondShow = true;
try {
for(SysMenu menu:menuList){
if(menu.getIsTop()==1 && !StringUtil.isEmpty(menu.getChildren())){
boolean topShow = false;
for(SysMenu second:menu.getChildren()){
boolean secondShow = false;
if(second.getIsShow()==1){
if(!StringUtil.isEmpty(second.getMenuBg())){
secondShow = true;
}
if(!StringUtil.isEmpty(second.getChildren())){
for(SysMenu third:second.getChildren()){
boolean thirdShow = false;
if(third.getIsShow()==1){
if(!StringUtil.isEmpty(third.getMenuBg())){
thirdShow = true;
secondShow = true;
}
if(!StringUtil.isEmpty(third.getChildren())){
for(SysMenu fourth:third.getChildren()){
if(!StringUtil.isEmpty(fourth.getMenuBg())&&fourth.getIsShow()==1){
newList.add(fourth);
thirdShow = true;
secondShow = true;
}
}
}
}
}
if(thirdShow){
newList.add(third);
if(thirdShow){
newList.add(third);
}
}
}
}
if(secondShow){
newList.add(second);
topShow = true;
}
if(secondShow){
newList.add(second);
topShow = true;
}
}
}
if(topShow){
newList.add(menu);
}
}
if(topShow){
/*if(menu.getChildren()!=null && menu.getChildren().size()>0 && menu.getIsShow()==1){
newList.add(menu);
}
}else if(menu.getMenuBg()!=null && !"".equals(menu.getMenuBg())){
newList.add(menu);
}else if(menu.getId()==1){
newList.add(menu);
}*/
/*if((menu.getParentIds().startsWith("0,1,86,")
|| menu.getId()==86
||menu.getId()==0
||menu.getId()==1)
&& menu.getIsShow()==1
){
System.out.println(menu.getParentIds());
newList.add(menu);
}*/
}
/*if(menu.getChildren()!=null && menu.getChildren().size()>0 && menu.getIsShow()==1){
newList.add(menu);
}else if(menu.getMenuBg()!=null && !"".equals(menu.getMenuBg())){
newList.add(menu);
}else if(menu.getId()==1){
newList.add(menu);
}*/
/*if((menu.getParentIds().startsWith("0,1,86,")
|| menu.getId()==86
||menu.getId()==0
||menu.getId()==1)
&& menu.getIsShow()==1
){
System.out.println(menu.getParentIds());
newList.add(menu);
}*/
} catch (Exception e) {
logger.error("help error",e);
}
logger.info("menuSize:"+newList.size());
model.addAttribute("menuList",newList);
return "/help";
}

View File

@@ -339,7 +339,7 @@
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" id="doLog" name="doLog" value="1">
<input type="hidden" id="doLog" name="doLog" value="2">
<div class="form-body">
<div class="row">

View File

@@ -148,7 +148,7 @@
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" id="doLog" name="doLog" value="1">
<input type="hidden" id="doLog" name="doLog" value="2">
<div class="form-body">
<div class="row">