Пример #1
0
 public void saveMenu(Menu menu) throws Exception {
   if (menu == null) {
     this.logger.warn("保存菜单失败:参数menu为空");
     throw new Exception("保存菜单失败:参数menu为空");
   }
   if (menu.getMenuId() != null && menu.getMenuId().intValue() > 0) {
     menuMapper.updateMenu(menu);
   } else {
     menuMapper.insertMenu(menu);
   }
 }
Пример #2
0
 public List<Menu> listSubMenuByParentId(Integer parentId) {
   if (parentId == null) {
     this.logger.warn("获取菜单失败:参数菜单id为空");
     return null;
   }
   return menuMapper.listSubMenuByParentId(parentId);
 }
Пример #3
0
 public Menu getMenuById(Integer menuId) {
   if (menuId == null) {
     this.logger.warn("获取菜单失败:参数菜单id为空");
     return null;
   }
   return menuMapper.getMenuById(menuId);
 }
Пример #4
0
 public void deleteMenuById(Integer menuId) throws Exception {
   if (menuId == null) {
     this.logger.warn("删除菜单失败:参数菜单id为空");
     throw new Exception("删除菜单失败:参数菜单id为空");
   }
   menuMapper.deleteMenuById(menuId);
 }
Пример #5
0
 @Override
 public Menu getMenuByName(String MenuName) {
   // TODO Auto-generated method stub
   return menuMapper.QuerySubMenuByName(MenuName);
 }
Пример #6
0
 public List<Menu> listAllSubMenu() {
   return menuMapper.listAllSubMenu();
 }
Пример #7
0
 public List<Menu> listAllParentMenu() {
   return menuMapper.listAllParentMenu();
 }