예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #4
0
 public boolean updateMenu(Map params) {
   DmMenu dmMenu = new DmMenu();
   dmMenu.loadFromMap(params);
   dmMenuMapper.updateByPrimaryKeySelective(dmMenu);
   return true;
 }