feat: 添加测试控制器

This commit is contained in:
陈淳
2023-12-14 14:15:56 +08:00
parent 6cc079aac7
commit ca9add7d93
4 changed files with 2281 additions and 921 deletions

View File

@@ -62,9 +62,22 @@ namespace Yi.Framework.Ddd.Application
{
}
public override Task<PagedResultDto<TGetListOutputDto>> GetListAsync(TGetListInput input)
public override async Task<PagedResultDto<TGetListOutputDto>> GetListAsync(TGetListInput input)
{
throw new NotImplementedException($"【{typeof(TEntity)}】实体的CrudAppService查询为具体业务通用查询几乎无实际场景请重写实现");
List<TEntity>? entites = null;
//区分多查还是批量查
if (input is IPagedResultRequest pagedInput)
{
entites = await Repository.GetPagedListAsync(pagedInput.SkipCount, pagedInput.MaxResultCount, string.Empty);
}
else
{
entites = await Repository.GetListAsync();
}
var total = await Repository.CountAsync();
var output = await MapToGetListOutputDtosAsync(entites);
return new PagedResultDto<TGetListOutputDto>(total, output);
//throw new NotImplementedException($"【{typeof(TEntity)}】实体的CrudAppService查询为具体业务通用查询几乎无实际场景请重写实现");
}
/// <summary>