예제 #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();
 }