ISysMenuService.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. using Dto;
  2. using Model;
  3. using Vo;
  4. namespace Services
  5. {
  6. public interface ISysMenuService : IBaseService<SysMenu>
  7. {
  8. //List<SysMenu> SelectMenuList(long userId);
  9. List<SysMenu> SelectMenuList(MenuQueryDto menu, long userId);
  10. List<TreeSelectVo> SelectTreeMenuList(MenuQueryDto menu, long userId);
  11. SysMenu GetMenuByMenuId(int menuId);
  12. List<SysMenu> GetMenusByMenuId(int menuId, long userId);
  13. long AddMenu(SysMenu menu);
  14. long EditMenu(SysMenu menu);
  15. int DeleteMenuById(int menuId);
  16. string CheckMenuNameUnique(SysMenu menu);
  17. int ChangeSortMenu(MenuDto menuDto);
  18. bool HasChildByMenuId(long menuId);
  19. List<SysMenu> SelectMenuTreeByUserId(long userId);
  20. //List<SysMenu> SelectMenuPermsListByUserId(long userId);
  21. List<string> SelectMenuPermsByUserId(long userId);
  22. //bool CheckMenuExistRole(long menuId);
  23. List<RouterVo> BuildMenus(List<SysMenu> menus);
  24. List<TreeSelectVo> BuildMenuTreeSelect(List<SysMenu> menus);
  25. List<LeftMenuVo> BuildLeftMenuTreeSelect(List<SysMenu> menus);
  26. List<SysMenu> SelectTreeMenuListByRoles(MenuQueryDto menu, List<long> roles);
  27. List<RoleMenuExportDto> SelectRoleMenuListByRole(MenuQueryDto menu, int roleId);
  28. }
  29. /// <summary>
  30. /// 角色菜单
  31. /// </summary>
  32. public interface ISysRoleMenuService : IBaseService<SysRoleMenu>
  33. {
  34. bool CheckMenuExistRole(long menuId);
  35. /// <summary>
  36. /// 根据角色获取菜单id
  37. /// </summary>
  38. /// <param name="roleId"></param>
  39. /// <returns></returns>
  40. List<SysRoleMenu> SelectRoleMenuByRoleId(long roleId);
  41. /// <summary>
  42. /// 根据用户所有角色获取菜单
  43. /// </summary>
  44. /// <param name="roleIds"></param>
  45. /// <returns></returns>
  46. List<SysRoleMenu> SelectRoleMenuByRoleIds(long[] roleIds);
  47. /// <summary>
  48. /// 批量插入用户菜单
  49. /// </summary>
  50. /// <param name="sysRoleMenus"></param>
  51. /// <returns></returns>
  52. int AddRoleMenu(List<SysRoleMenu> sysRoleMenus);
  53. /// <summary>
  54. /// 删除角色与菜单关联
  55. /// </summary>
  56. /// <param name="roleId"></param>
  57. /// <returns></returns>
  58. int DeleteRoleMenuByRoleId(long roleId);
  59. /// <summary>
  60. /// 删除角色指定菜单
  61. /// </summary>
  62. /// <param name="roleId"></param>
  63. /// <param name="menuIds"></param>
  64. /// <returns></returns>
  65. bool DeleteRoleMenuByRoleIdMenuIds(long roleId, long[] menuIds);
  66. }
  67. }