|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
-
- //
-
-
-
-
-
-
-
-
- namespace SafeCampus.Application;
-
- public interface IRoleService : ITransient
- {
- #region 查询
-
- /// <summary>
- /// 角色拥有资源
- /// </summary>
- /// <param name="input">角色id</param>
- /// <param name="category">资源类型</param>
- /// <returns>角色拥有资源信息</returns>
- Task<RoleOwnResourceOutput> OwnResource(BaseIdInput input, string category);
-
- /// <summary>
- /// 获取角色下的用户
- /// </summary>
- /// <param name="input">角色ID</param>
- /// <returns></returns>
- Task<List<UserSelectorOutPut>> OwnUser(BaseIdInput input);
-
- /// <summary>
- /// 分页查询角色
- /// </summary>
- /// <param name="input">查询参数</param>
- /// <returns></returns>
- Task<SqlSugarPagedList<SysRole>> Page(RolePageInput input);
-
- /// <summary>
- /// 角色选择器
- /// </summary>
- /// <param name="input"></param>
- /// <returns></returns>
- Task<SqlSugarPagedList<RoleSelectorOutPut>> RoleSelector(RoleSelectorInput input);
-
- /// <summary>
- /// 获取角色树
- /// </summary>
- /// <param name="input">角色树</param>
- /// <returns></returns>
- Task<List<RoleTreeOutput>> Tree(RoleTreeInput input);
-
- /// <summary>
- /// 角色详情
- /// </summary>
- /// <param name="input">角色Id</param>
- /// <returns></returns>
- Task<SysRole> Detail(BaseIdInput input);
-
- /// <summary>
- /// 资源树选择器
- /// </summary>
- /// <returns></returns>
- Task<List<ResTreeSelector>> ResourceTreeSelector();
-
- #endregion
-
- #region 新增
-
- /// <summary>
- /// 添加角色
- /// </summary>
- /// <param name="input">添加参数</param>
- /// <returns></returns>
- Task Add(RoleAddInput input);
-
- #endregion
-
- #region 编辑
-
- /// <summary>
- /// 编辑角色
- /// </summary>
- /// <param name="input">编辑参数</param>
- /// <returns></returns>
- Task Edit(RoleEditInput input);
-
-
- /// <summary>
- /// 给角色授权
- /// </summary>
- /// <param name="input">授权参数</param>
- /// <returns></returns>
- Task GrantResource(GrantResourceInput input);
-
- /// <summary>
- /// 给角色授权用户
- /// </summary>
- /// <param name="input">授权信息</param>
- /// <returns></returns>
- Task GrantUser(GrantUserInput input);
-
- #endregion
-
- #region 删除
-
- /// <summary>
- /// 删除角色
- /// </summary>
- /// <param name="input">删除参数</param>
- /// <returns></returns>
- Task Delete(BaseIdListInput input);
-
- #endregion
- }
|