平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

116 lines
2.5 KiB

  1. //
  2. namespace SafeCampus.Application;
  3. public interface IRoleService : ITransient
  4. {
  5. #region 查询
  6. /// <summary>
  7. /// 角色拥有资源
  8. /// </summary>
  9. /// <param name="input">角色id</param>
  10. /// <param name="category">资源类型</param>
  11. /// <returns>角色拥有资源信息</returns>
  12. Task<RoleOwnResourceOutput> OwnResource(BaseIdInput input, string category);
  13. /// <summary>
  14. /// 获取角色下的用户
  15. /// </summary>
  16. /// <param name="input">角色ID</param>
  17. /// <returns></returns>
  18. Task<List<UserSelectorOutPut>> OwnUser(BaseIdInput input);
  19. /// <summary>
  20. /// 分页查询角色
  21. /// </summary>
  22. /// <param name="input">查询参数</param>
  23. /// <returns></returns>
  24. Task<SqlSugarPagedList<SysRole>> Page(RolePageInput input);
  25. /// <summary>
  26. /// 角色选择器
  27. /// </summary>
  28. /// <param name="input"></param>
  29. /// <returns></returns>
  30. Task<SqlSugarPagedList<RoleSelectorOutPut>> RoleSelector(RoleSelectorInput input);
  31. /// <summary>
  32. /// 获取角色树
  33. /// </summary>
  34. /// <param name="input">角色树</param>
  35. /// <returns></returns>
  36. Task<List<RoleTreeOutput>> Tree(RoleTreeInput input);
  37. /// <summary>
  38. /// 角色详情
  39. /// </summary>
  40. /// <param name="input">角色Id</param>
  41. /// <returns></returns>
  42. Task<SysRole> Detail(BaseIdInput input);
  43. /// <summary>
  44. /// 资源树选择器
  45. /// </summary>
  46. /// <returns></returns>
  47. Task<List<ResTreeSelector>> ResourceTreeSelector();
  48. #endregion
  49. #region 新增
  50. /// <summary>
  51. /// 添加角色
  52. /// </summary>
  53. /// <param name="input">添加参数</param>
  54. /// <returns></returns>
  55. Task Add(RoleAddInput input);
  56. #endregion
  57. #region 编辑
  58. /// <summary>
  59. /// 编辑角色
  60. /// </summary>
  61. /// <param name="input">编辑参数</param>
  62. /// <returns></returns>
  63. Task Edit(RoleEditInput input);
  64. /// <summary>
  65. /// 给角色授权
  66. /// </summary>
  67. /// <param name="input">授权参数</param>
  68. /// <returns></returns>
  69. Task GrantResource(GrantResourceInput input);
  70. /// <summary>
  71. /// 给角色授权用户
  72. /// </summary>
  73. /// <param name="input">授权信息</param>
  74. /// <returns></returns>
  75. Task GrantUser(GrantUserInput input);
  76. #endregion
  77. #region 删除
  78. /// <summary>
  79. /// 删除角色
  80. /// </summary>
  81. /// <param name="input">删除参数</param>
  82. /// <returns></returns>
  83. Task Delete(BaseIdListInput input);
  84. #endregion
  85. }