IRoleService.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using GxPress.Request.Role;
  4. namespace GxPress.Service.Interface.Role
  5. {
  6. public interface IRoleService : IService
  7. {
  8. /// <summary>
  9. /// 添加权限菜单关联
  10. /// </summary>
  11. /// <param name="models"></param>
  12. /// <returns></returns>
  13. Task<bool> InsertSystemRoleMenusAsync(SystemRoleMenusInRequest models);
  14. /// <summary>
  15. /// 添加权限
  16. /// </summary>
  17. /// <param name="models"></param>
  18. /// <returns></returns>
  19. Task<bool> InsertSystemRoleAsync(Entity.SystemRole.SystemRole model);
  20. /// <summary>
  21. /// 修改权限
  22. /// </summary>
  23. /// <param name="model"></param>
  24. /// <returns></returns>
  25. Task<bool> UpdateSystemRoleAsync(Entity.SystemRole.SystemRole model);
  26. /// <summary>
  27. /// 删除权限
  28. /// </summary>
  29. /// <param name="id"></param>
  30. /// <returns></returns>
  31. Task<bool> DeleteSystemRoleAsync(int id);
  32. /// <summary>
  33. /// 添加菜单
  34. /// </summary>
  35. /// <param name="models"></param>
  36. /// <returns></returns>
  37. Task<bool> InsertMenusAsync(Entity.Menus.Menus model);
  38. Task<bool> InsertMenusAsync(List<Entity.Menus.Menus> models);
  39. /// <summary>
  40. /// 修改菜单
  41. /// </summary>
  42. /// <param name="model"></param>
  43. /// <returns></returns>
  44. Task<bool> UpdateMenusAsync(Entity.Menus.Menus model);
  45. /// <summary>
  46. /// 删除菜单
  47. /// </summary>
  48. /// <param name="id"></param>
  49. /// <returns></returns>
  50. Task<bool> DeleteMenusAsync(int id);
  51. /// <summary>
  52. /// 根据权限ID获取菜单
  53. /// </summary>
  54. /// <param name="roleId"></param>
  55. /// <returns></returns>
  56. Task<IEnumerable<Entity.Menus.Menus>> GetMenusAllAsync(int roleId);
  57. /// <summary>
  58. /// 获取所有菜单
  59. /// </summary>
  60. /// <param name="roleId"></param>
  61. /// <returns></returns>
  62. Task<IEnumerable<Entity.Menus.Menus>> GetMenusAllAsync();
  63. }
  64. }