Add Filter parameter to GetListAsync method of IIdentityRoleAppService.

Resolve #5814
pull/5908/head
maliming 5 years ago
parent b4bc7a5584
commit 234024cb6a

@ -0,0 +1,9 @@
using Volo.Abp.Application.Dtos;
namespace Volo.Abp.Identity
{
public class GetIdentityRolesInput : PagedAndSortedResultRequestDto
{
public string Filter { get; set; }
}
}

@ -9,7 +9,7 @@ namespace Volo.Abp.Identity
: ICrudAppService<
IdentityRoleDto,
Guid,
PagedAndSortedResultRequestDto,
GetIdentityRolesInput,
IdentityRoleCreateDto,
IdentityRoleUpdateDto>
{

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
@ -37,9 +37,9 @@ namespace Volo.Abp.Identity
);
}
public virtual async Task<PagedResultDto<IdentityRoleDto>> GetListAsync(PagedAndSortedResultRequestDto input)
public virtual async Task<PagedResultDto<IdentityRoleDto>> GetListAsync(GetIdentityRolesInput input)
{
var list = await RoleRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount);
var list = await RoleRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter);
var totalCount = await RoleRepository.GetCountAsync();
return new PagedResultDto<IdentityRoleDto>(
@ -57,7 +57,7 @@ namespace Volo.Abp.Identity
CurrentTenant.Id
)
{
IsDefault = input.IsDefault,
IsDefault = input.IsDefault,
IsPublic = input.IsPublic
};

@ -1,13 +1,12 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos;
using Volo.Abp.BlazoriseUI;
using Volo.Abp.PermissionManagement.Blazor.Components;
namespace Volo.Abp.Identity.Blazor.Pages.Identity
{
public abstract class RoleManagementBase : AbpCrudPageBase<IIdentityRoleAppService,IdentityRoleDto, Guid, PagedAndSortedResultRequestDto, IdentityRoleCreateDto, IdentityRoleUpdateDto>
public abstract class RoleManagementBase : AbpCrudPageBase<IIdentityRoleAppService, IdentityRoleDto, Guid, GetIdentityRolesInput, IdentityRoleCreateDto, IdentityRoleUpdateDto>
{
protected const string PermissionProviderName = "R";

@ -27,7 +27,7 @@ namespace Volo.Abp.Identity
}
[HttpGet]
public virtual Task<PagedResultDto<IdentityRoleDto>> GetListAsync(PagedAndSortedResultRequestDto input)
public virtual Task<PagedResultDto<IdentityRoleDto>> GetListAsync(GetIdentityRolesInput input)
{
return RoleAppService.GetListAsync(input);
}

@ -45,13 +45,13 @@ namespace Volo.Abp.Identity
result.Items.Count.ShouldBeGreaterThan(0);
}
[Fact]
public async Task GetListAsync()
{
//Act
var result = await _roleAppService.GetListAsync(new PagedAndSortedResultRequestDto());
var result = await _roleAppService.GetListAsync(new GetIdentityRolesInput());
//Assert

Loading…
Cancel
Save