平安校园
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

IRoleService.cs 2.5 KiB

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