maliming
4 years ago
No known key found for this signature in database
GPG Key ID: 96224957E51C89E
1 changed files with
10 additions and
5 deletions
-
framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs
|
|
|
@ -63,14 +63,19 @@ public abstract class AbstractKeyReadOnlyAppService<TEntity, TGetOutputDto, TGet |
|
|
|
await CheckGetListPolicyAsync(); |
|
|
|
|
|
|
|
var query = await CreateFilteredQueryAsync(input); |
|
|
|
|
|
|
|
var totalCount = await AsyncExecuter.CountAsync(query); |
|
|
|
|
|
|
|
query = ApplySorting(query, input); |
|
|
|
query = ApplyPaging(query, input); |
|
|
|
var entities = new List<TEntity>(); |
|
|
|
var entityDtos = new List<TGetListOutputDto>(); |
|
|
|
|
|
|
|
if (totalCount > 0) |
|
|
|
{ |
|
|
|
query = ApplySorting(query, input); |
|
|
|
query = ApplyPaging(query, input); |
|
|
|
|
|
|
|
var entities = await AsyncExecuter.ToListAsync(query); |
|
|
|
var entityDtos = await MapToGetListOutputDtosAsync(entities); |
|
|
|
entities = await AsyncExecuter.ToListAsync(query); |
|
|
|
entityDtos = await MapToGetListOutputDtosAsync(entities); |
|
|
|
} |
|
|
|
|
|
|
|
return new PagedResultDto<TGetListOutputDto>( |
|
|
|
totalCount, |
|
|
|
|