using YBEE.EQM.Core;
namespace YBEE.EQM.Application
{
///
/// 角色用户
///
[ApiDescriptionSettings(Name = "sys-role-user")]
[Route("sys/role/user")]
[AppAuthorize]
public class SysRoleUserAppService : IDynamicApiController
{
private readonly ISysRoleUserService _roleUserService;
public SysRoleUserAppService(ISysRoleUserService roleUserService)
{
_roleUserService = roleUserService;
}
///
/// 添加用户到角色
///
///
///
public async Task AddRoleUser(SysRoleUserInput input)
{
await _roleUserService.AddRoleUser(input);
}
///
/// 移出角色中的用户
///
///
///
public async Task RemoveRoleUser(SysRoleUserInput input)
{
await _roleUserService.RemoveRoleUser(input);
}
///
/// 获取指定角色中的用户列表
///
///
///
[DisableOpLog]
public async Task> GetInRoleUserList([Required] int roleId)
{
return await _roleUserService.GetInRoleUserList(roleId);
}
///
/// 分页查询角色用户列表
///
///
///
[DisableOpLog]
public async Task> QueryInRoleUserPageList(SysRoleUserPageInput input)
{
return await _roleUserService.QueryInRoleUserPageList(input);
}
///
/// 获取未在指定角色中的用户列表
///
///
///
[DisableOpLog]
public async Task> GetNotInRoleUserList([Required] int roleId)
{
return await _roleUserService.GetNotInRoleUserList(roleId);
}
///
/// 通过权限标识获取人员列表
///
/// 权限标识
///
[DisableOpLog]
public async Task> GetUserListByPermission([Required] string permission)
{
return await _roleUserService.GetUserListByPermission(permission);
}
}
}