Beispiel #1
0
 public List searchChildMenu(String parentMenu) {
   Map params = new HashMap();
   params.put("parentMenu", parentMenu);
   List<DmMenu> children = dmMenuMapper.searchMenus(params);
   for (DmMenu dmMenu : children) {
     dmMenu.setChildren(searchChildMenu(String.valueOf(dmMenu.getParentMenu())));
   }
   return children;
 }
Beispiel #2
0
 public List searchAdminMenus(Map params) {
   List<DmMenu> dmMenus = dmMenuMapper.searchMenus(params);
   for (DmMenu dmMenu : dmMenus) {
     Map m = new HashMap();
     m.put("parentMenu", dmMenu.getMenuId());
     dmMenu.setChildren(searchAdminMenus(m));
   }
   return dmMenus;
 }
Beispiel #3
0
 public List searchAllMenus(Map params) {
   List<DmMenu> dmMenus = dmMenuMapper.searchMenusByPriv(params);
   for (DmMenu dmMenu : dmMenus) {
     Map m = new HashMap();
     m.put("parentMenu", dmMenu.getMenuId());
     m.put("privIds", params.get("privIds"));
     m.put("staffId", params.get("staffId"));
     dmMenu.setChildren(searchAllMenus(m));
   }
   return dmMenus;
 }