This commit is contained in:
xiaolipro 2024-12-10 18:02:37 +08:00
parent 512c511707
commit 4262004ae6
50 changed files with 98 additions and 81 deletions

View File

@ -16,7 +16,7 @@
<ItemGroup>
<ProjectReference Include="..\InterfaceForward.Application\InterfaceForward.Application.csproj" />
<ProjectReference Include="..\InterfaceForward.ServiceDefaults\InterfaceForward.ServiceDefaults.csproj"/>
<PackageReference Include="Fake.Autofac" Version="8.0.0-preview8.5" />
<PackageReference Include="Fake.Autofac" Version="8.0.1" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="10.0.0" />

View File

@ -21,9 +21,9 @@ public class InterfaceForwardApiModule : FakeModule
// Add services to the container.
services.AddProblemDetails();
services.Configure<RemoteServiceConventionOptions>(options =>
services.Configure<ApplicationService2ControllerOptions>(options =>
{
options.AddAssembly(typeof(InterfaceForwardApplicationModule).Assembly);
options.ScanApplicationServices<InterfaceForwardApplicationModule>();
});
services.AddFakeSwaggerGen()

View File

@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aspire.Hosting" Version="8.0.0-preview.1.23557.2"/>
<PackageReference Include="Aspire.Hosting" Version="8.2.2" />
</ItemGroup>
<ItemGroup>

View File

@ -1,6 +1,4 @@
using Fake.DomainDrivenDesign.Application.Dtos;
namespace InterfaceForward.Application.Contracts.ForwardCore;
namespace InterfaceForward.Application.Contracts.ForwardCore;
[Serializable]
public class InterfaceRelayUnifyResultDto

View File

@ -3,7 +3,7 @@
<Import Project="../../common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>

View File

@ -1,4 +1,5 @@
using System.Text;
using Fake.Application;
using Fake.AspNetCore.Http;
using InterfaceForward.Repositories;
using InterfaceForward.Repositories.Log.Services;

View File

@ -4,6 +4,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Xml;
using Fake.Application;
using InterfaceForward.Application.Contracts.ForwardCore;
using InterfaceForward.Application.Helpers;
using InterfaceForward.Application.OSS;

View File

@ -1,6 +1,6 @@
// Global using directives
global using Fake;
global using Fake.DomainDrivenDesign.Application;
global using Fake.DomainDrivenDesign.Application.Dtos;
global using Fake.Application;
global using Fake.Application.Dtos;
global using InterfaceForward.Domain.Shared.Helpers;

View File

@ -17,9 +17,9 @@
<PackageReference Include="DiffPlex" Version="1.7.2" />
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
<PackageReference Include="DotNetCore.Natasha.CSharp" Version="5.2.2.1"/>
<PackageReference Include="Fake.AspNetCore" Version="8.0.0-preview8.5" />
<PackageReference Include="Fake.EventBus.RabbitMQ" Version="1.0.0" />
<PackageReference Include="Fake.ObjectMapping.AutoMapper" Version="8.0.0-preview8.5" />
<PackageReference Include="Fake.AspNetCore" Version="8.0.1" />
<PackageReference Include="Fake.EventBus.RabbitMQ" Version="8.0.1" />
<PackageReference Include="Fake.ObjectMapping.AutoMapper" Version="8.0.1" />
<PackageReference Include="FreeRedis" Version="1.2.15" />
</ItemGroup>

View File

@ -21,7 +21,7 @@ public class InterfaceForwardApplicationModule:FakeModule
context.Services.Configure<FakeAutoMapperOptions>(options =>
{
options.AddMaps<InterfaceForwardApplicationModule>();
options.ScanProfiles<InterfaceForwardApplicationModule>();
});
context.Services.Configure<InterfaceRelayOptions>(configuration.GetSection("InterfaceRelay"));

View File

@ -1,22 +1,38 @@
using System.Text;
using Fake.RabbitMQ;
using InterfaceForward.Domain.Shared;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
namespace InterfaceForward.Application.Rabbit;
public class RabbitClient(IRabbitMqConnector connector)
public class RabbitClient(IRabbitMqChannelPool channelPool)
{
public void Subscribe(ConsumeOptions consumeOptions)
{
using var channel = connector.CreateChannel();
var consumer = new EventingBasicConsumer(channel);
consumer.Received += (model, ea) =>
using var channelAccessor = channelPool.Acquire(consumeOptions.Queue, configureChannel: channel =>
{
channel.ExchangeDeclare(GlobalConst.InterfaceRelayExchange, ExchangeType.Direct, true);
channel.QueueDeclare(consumeOptions.Queue, true);
channel.QueueBind(consumeOptions.Queue, GlobalConst.InterfaceRelayExchange, consumeOptions.Queue);
if (consumeOptions.FetchCount > 0)
{
channel.BasicQos(0, consumeOptions.FetchCount, false);
}
var consumer = new AsyncEventingBasicConsumer(channel);
consumer.Received += async (model, ea) =>
{
var body = ea.Body.ToArray();
var message = Encoding.UTF8.GetString(body);
Console.WriteLine(" [x] Received {0}", message);
};
channel.BasicConsume(queue: consumeOptions.Queue,
autoAck: true,
autoAck: false,
consumer: consumer);
});
}
}

View File

@ -47,7 +47,7 @@ public class AppsService : BaseService
/// <param name="input">入参</param>
/// <returns></returns>
[HttpGet("GetList")]
public async Task<PagedListDto<AppListOutput>> GetList([FromQuery] PagedQueryInput input)
public async Task<PagedResult<AppListOutput>> GetList([FromQuery] PagedQueryInput input)
{
var res = await _appRepository.AsQueryable()
.Select(x => new AppListOutput { Id = x.Id.SelectAll() })

View File

@ -1,5 +1,4 @@
using InterfaceForward.Domain.Shared.Dtos;
using InterfaceForward.Repositories.Log.Entitys;
using InterfaceForward.Repositories.Log.Entitys;
using InterfaceForward.Repositories.Log.Services;
using InterfaceForward.Repositories.Log.ValueObjects;
using Microsoft.AspNetCore.Mvc;
@ -32,11 +31,11 @@ namespace InterfaceForward.Application.Services.App
/// <param name="input">入参</param>
/// <returns></returns>
[HttpGet("GetList")]
public async Task<PagedListDto<LogIndex>> GetList(LogGetListInputValueObject input)
public async Task<PagedResult<LogIndex>> GetList(LogGetListInputValueObject input)
{
var res = await _logRepository.GetListAsync(input);
return new PagedListDto<LogIndex>(res.list, (int)res.total);
return new PagedResult<LogIndex>(res.total, res.list);
}
/// <summary>
@ -45,7 +44,7 @@ namespace InterfaceForward.Application.Services.App
/// <param name="input">入参</param>
/// <returns></returns>
[HttpGet("GetLogsStatistics")]
public async Task<PagedListDto<LogGetListOutputValueObject>> GetLogsStatistics(LogStatisticsInputValueObject input)
public async Task<PagedResult<LogGetListOutputValueObject>> GetLogsStatistics(LogStatisticsInputValueObject input)
{
var esData = await _logRepository.GetLogsStatisticsAsync(input);
@ -88,7 +87,7 @@ namespace InterfaceForward.Application.Services.App
.Skip((input.PageIndex - 1) * input.PageSize)
.Take(input.PageSize).ToList();
return new PagedListDto<LogGetListOutputValueObject>(res, list.Count);
return new PagedResult<LogGetListOutputValueObject>(list.Count, res);
}
/// <summary>

View File

@ -1,4 +1,6 @@
namespace InterfaceForward.Application.Services;
using Fake.Application;
namespace InterfaceForward.Application.Services;
public abstract class BaseService : ApplicationService
{

View File

@ -41,7 +41,7 @@ public class ServiceProviderInterfaceService : BaseService
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("Interface/ServiceProviderInterfacePaginatedList")]
public async Task<PagedListDto<ServiceProviderInterfacePaginatedOutputValueObject>>
public async Task<PagedResult<ServiceProviderInterfacePaginatedOutputValueObject>>
ServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input)
{
return await InterfaceRepository.GetServiceProviderInterfacePaginatedListAsync(input);

View File

@ -49,7 +49,7 @@ public class SystemInterfaceService : BaseService
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("Interface/SystemInterfacePaginatedList")]
public async Task<PagedListDto<SystemInterfacePaginatedOutputValueObject>>
public async Task<PagedResult<SystemInterfacePaginatedOutputValueObject>>
SystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input)
{
return await _interfaceRepository.GetSystemInterfacePaginatedListAsync(input);

View File

@ -96,7 +96,7 @@ public partial class InterfaceMapService : ApplicationService
/// <param name="inputVo"></param>
/// <returns></returns>
[HttpGet("InterfaceMap/GetMapList")]
public async Task<PagedListDto<InterfaceMapOutputValueObject>> GetMapListByIdAsync(GetMapListInputVO inputVo)
public async Task<PagedResult<InterfaceMapOutputValueObject>> GetMapListByIdAsync(GetMapListInputVO inputVo)
{
return await _interfaceMapRepository.GetMapListAsync(inputVo);
}

View File

@ -191,12 +191,12 @@ public class ServiceProviderAccountService : BaseService
/// <param name="pageSize">页大小</param>
/// <returns></returns>
[HttpGet("ServiceProviderAccount/GetAccountPageList")]
public async Task<PagedListDto<Dictionary<string, object?>>> GetAccountPageListAsync(
public async Task<PagedResult<Dictionary<string, object?>>> GetAccountPageListAsync(
[Required] int serviceProviderId
, int pageIndex = 1
, int pageSize = 50)
{
var res = new PagedListDto<Dictionary<string, object?>>();
var res = new PagedResult<Dictionary<string, object?>>();
// 获取账户列表分页数据
var data = await _serviceProviderAccountRepository.GetAccountPageListAsync(serviceProviderId, pageIndex,

View File

@ -37,7 +37,7 @@ public class ServiceProviderService : BaseService
/// <param name="input">入参</param>
/// <returns></returns>
[HttpPost("ServiceProvider/PaginatedList")]
public async Task<PagedListDto<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
public async Task<PagedResult<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
ServiceProviderPaginatedInputObjectValue input)
{
return await _serviceProviderRepository.GetPaginatedListAsync(input);

View File

@ -1,4 +1,5 @@
using Fake;
using Fake.Application;
using InterfaceForward.Domain.Shared.Dtos;
using InterfaceForward.Domain.Shared.Enum;
using Newtonsoft.Json.Linq;

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props"/>
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
@ -11,6 +11,6 @@
<ItemGroup>
<PackageReference Include="Fake.DomainDrivenDesign" Version="8.0.0-preview8.5" />
<PackageReference Include="Fake.DomainDrivenDesign" Version="8.0.1" />
</ItemGroup>
</Project>

View File

@ -4,7 +4,7 @@
/// 应用表
///</summary>
[SugarTable("t_app")]
public class AppEntity : FullAuditedAggregate<int>
public class AppEntity : FullAuditedAggregateRoot<int>
{
///<summary>
/// 自增主键

View File

@ -4,7 +4,7 @@
/// 应用可用接口表
///</summary>
[SugarTable("t_app_scope")]
public class AppScopeEntity : FullAuditedAggregate<int>
public class AppScopeEntity : FullAuditedAggregateRoot<int>
{
///<summary>
/// 自增主键

View File

@ -1,8 +1,6 @@
using System.Linq.Expressions;
using Fake;
using Fake.DomainDrivenDesign.Entities;
using Fake.Domain.Entities;
using Fake.DomainDrivenDesign.Repositories.SqlSugarCore;
using Fake.UnitOfWork;
namespace InterfaceForward.Repositories;

View File

@ -4,7 +4,7 @@
/// 字典表
///</summary>
[SugarTable("t_dictionary")]
public class DictionaryEntity : FullAuditedAggregate<int>
public class DictionaryEntity : FullAuditedAggregateRoot<int>
{
///<summary>

View File

@ -1,7 +1,8 @@
// Global using directives
global using Fake.Application;
global using Fake.Application.Dtos;
global using Fake.DependencyInjection;
global using Fake.Domain.Entities.Auditing;
global using Fake.DomainDrivenDesign;
global using Fake.DomainDrivenDesign.Application.Dtos;
global using Fake.DomainDrivenDesign.Entities.Auditing;
global using SqlSugar;

View File

@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.Interface.Entitys;
/// 接口表
///</summary>
[SugarTable("t_interface")]
public class InterfaceEntity : FullAuditedAggregate<int>
public class InterfaceEntity : FullAuditedAggregateRoot<int>
{
///<summary>

View File

@ -4,7 +4,7 @@
/// 接口映射明细表
///</summary>
[SugarTable("t_interface_map_detail")]
public class InterfaceMapDetailEntity: FullAuditedAggregate<int>
public class InterfaceMapDetailEntity: FullAuditedAggregateRoot<int>
{
///<summary>
/// 映射明细id

View File

@ -4,7 +4,7 @@
/// 接口映射表
///</summary>
[SugarTable("t_interface_map")]
public class InterfaceMapEntity : FullAuditedAggregate<int>
public class InterfaceMapEntity : FullAuditedAggregateRoot<int>
{
///<summary>

View File

@ -1,4 +1,4 @@
using Fake.DomainDrivenDesign.Entities;
using Fake.Domain.Entities;
namespace InterfaceForward.Repositories.Interface.Entitys;
@ -69,4 +69,6 @@ public class InterfaceMapPublishedEntity: CreateAuditedEntity<int>,IAggregateRoo
/// <summary>创建时间</summary>
[SugarColumn(ColumnName = "CreateTime")]
public virtual DateTime? CreateTime { get; set; }
public Guid ConcurrencyStamp { get; set; }
}

View File

@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.Interface.Entitys;
/// 接口返回配置
///</summary>
[SugarTable("t_interface_return_config")]
public class InterfaceReturnConfigEntity : FullAuditedAggregate<int>
public class InterfaceReturnConfigEntity : FullAuditedAggregateRoot<int>
{
///<summary>
/// 自增主键

View File

@ -13,7 +13,7 @@ namespace InterfaceForward.Repositories.Interface.Services
/// </summary>
/// <param name="inputVo"></param>
/// <returns></returns>
Task<PagedListDto<InterfaceMapOutputValueObject>> GetMapListAsync(GetMapListInputVO inputVo);
Task<PagedResult<InterfaceMapOutputValueObject>> GetMapListAsync(GetMapListInputVO inputVo);
/// <summary>
/// 获取参数映射列表

View File

@ -17,14 +17,14 @@ namespace InterfaceForward.Repositories.Interface.Services
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<PagedListDto<SystemInterfacePaginatedOutputValueObject>> GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input);
Task<PagedResult<SystemInterfacePaginatedOutputValueObject>> GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input);
/// <summary>
/// 获取服务商接口分页
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<PagedListDto<ServiceProviderInterfacePaginatedOutputValueObject>> GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input);
Task<PagedResult<ServiceProviderInterfacePaginatedOutputValueObject>> GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input);
/// <summary>
/// 获取参数列表

View File

@ -15,7 +15,7 @@ public class InterfaceMapRepository : BasicRepository<InterfaceMapEntity>, IScop
/// </summary>
/// <param name="inputVo"></param>
/// <returns></returns>
public async Task<PagedListDto<InterfaceMapOutputValueObject>> GetMapListAsync(GetMapListInputVO inputVo)
public async Task<PagedResult<InterfaceMapOutputValueObject>> GetMapListAsync(GetMapListInputVO inputVo)
{
// 上下游一对多关系
var query = Context.Queryable<InterfaceMapEntity>()

View File

@ -16,7 +16,7 @@ public class InterfaceRepository : BasicRepository<InterfaceEntity>, IInterfaceR
public string InterfaceGroup => "InterfaceGroup";
/// <inheritdoc />
public async Task<PagedListDto<SystemInterfacePaginatedOutputValueObject>>
public async Task<PagedResult<SystemInterfacePaginatedOutputValueObject>>
GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input)
{
// t_interface驱动t_interface_map数据量上来可以在t_interface_map UpStreamId字段建立索引
@ -47,7 +47,7 @@ public class InterfaceRepository : BasicRepository<InterfaceEntity>, IInterfaceR
}
/// <inheritdoc />
public async Task<PagedListDto<ServiceProviderInterfacePaginatedOutputValueObject>>
public async Task<PagedResult<ServiceProviderInterfacePaginatedOutputValueObject>>
GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input)
{
var query = AsQueryable()

View File

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Fake.SqlSugarCore" Version="8.0.0-preview8.5" />
<PackageReference Include="Fake.SqlSugarCore" Version="8.0.0" />
<PackageReference Include="NEST" Version="7.17.5" />
</ItemGroup>

View File

@ -1,5 +1,4 @@
using Fake;
using InterfaceForward.Domain.Shared.Dtos;
using InterfaceForward.Domain.Shared.Dtos;
using InterfaceForward.Domain.Shared.Enum;
using InterfaceForward.Domain.Shared.Helpers;
using InterfaceForward.Repositories.App.Entitys;

View File

@ -4,7 +4,7 @@
/// 固定参数
///</summary>
[SugarTable("t_parameter_fixed")]
public class FixedParameterEntity : FullAuditedAggregate<int>
public class FixedParameterEntity : FullAuditedAggregateRoot<int>
{
///<summary>

View File

@ -4,7 +4,7 @@
/// 表单参数
///</summary>
[SugarTable("t_parameter_form")]
public class FormParameterEntity : FullAuditedAggregate<int>
public class FormParameterEntity : FullAuditedAggregateRoot<int>
{
///<summary>
/// 自增主键

View File

@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.Interface.Entitys
/// 参数表
///</summary>
[SugarTable("t_parameter")]
public class ParameterEntity : FullAuditedAggregate<int>
public class ParameterEntity : FullAuditedAggregateRoot<int>
{
///<summary>

View File

@ -4,7 +4,7 @@
/// 服务商账户表
///</summary>
[SugarTable("t_service_provider_account")]
public class ServiceProviderAccountEntity : FullAuditedAggregate<int>
public class ServiceProviderAccountEntity : FullAuditedAggregateRoot<int>
{
///<summary>
/// 自增主键

View File

@ -2,7 +2,7 @@
/// 服务商账户字段表
///</summary>
[SugarTable("t_service_provider_account_field")]
public class ServiceProviderAccountFieldEntity : FullAuditedAggregate<int>
public class ServiceProviderAccountFieldEntity : FullAuditedAggregateRoot<int>
{
///<summary>

View File

@ -1,4 +1,4 @@
using Fake.DomainDrivenDesign.Entities;
using Fake.Domain.Entities;
namespace InterfaceForward.Repositories.ServiceProvider.Entitys;
@ -7,7 +7,7 @@ namespace InterfaceForward.Repositories.ServiceProvider.Entitys;
/// 服务商账户授权表
///</summary>
[SugarTable("t_service_provider_account_field_value")]
public class ServiceProviderAccountFieldValueEntity: Entity<int>, IAggregateRoot
public class ServiceProviderAccountFieldValueEntity: AggregateRoot<int>
{
///<summary>
/// 自增主键

View File

@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.ServiceProvider.Entitys;
/// 服务商授权配置表
///</summary>
[SugarTable("t_service_provider_auth_config")]
public class ServiceProviderAuthConfigEntity: FullAuditedAggregate<int>
public class ServiceProviderAuthConfigEntity: FullAuditedAggregateRoot<int>
{
///<summary>
/// 自增主键

View File

@ -4,7 +4,7 @@
/// 服务商主表
///</summary>
[SugarTable("t_service_provider")]
public class ServiceProviderEntity : FullAuditedAggregate<int>
public class ServiceProviderEntity : FullAuditedAggregateRoot<int>
{
///<summary>

View File

@ -1,5 +1,4 @@
using InterfaceForward.Domain.Shared.Dtos;
using InterfaceForward.Repositories.ServiceProvider.Entitys;
using InterfaceForward.Repositories.ServiceProvider.Entitys;
using InterfaceForward.Repositories.ServiceProvider.ValueObjects;
namespace InterfaceForward.Repositories.ServiceProvider.Services;
@ -30,7 +29,7 @@ public interface IServiceProviderAccountRepository : IBasicRepository<ServicePro
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <returns></returns>
Task<PagedListDto<ServiceProviderAccountPageValueObject>> GetAccountPageListAsync(int serviceProviderId,
Task<PagedResult<ServiceProviderAccountPageValueObject>> GetAccountPageListAsync(int serviceProviderId,
int pageIndex, int pageSize);

View File

@ -14,7 +14,7 @@ namespace InterfaceForward.Repositories.ServiceProvider.Services
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
Task<PagedListDto<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
Task<PagedResult<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
ServiceProviderPaginatedInputObjectValue input);
/// <summary>

View File

@ -20,7 +20,7 @@ public class ServiceProviderAccountRepository : BasicRepository<ServiceProviderA
.ExecuteCommandAsync();
}
public async Task<PagedListDto<ServiceProviderAccountPageValueObject>> GetAccountPageListAsync(
public async Task<PagedResult<ServiceProviderAccountPageValueObject>> GetAccountPageListAsync(
int serviceProviderId, int pageIndex, int pageSize)
{
return await Context.Queryable<ServiceProviderAccountEntity>()

View File

@ -13,7 +13,7 @@ public class ServiceProviderRepository : BasicRepository<ServiceProviderEntity>,
IServiceProviderRepository
{
/// <inheritdoc />
public async Task<PagedListDto<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
public async Task<PagedResult<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
ServiceProviderPaginatedInputObjectValue input)
{
// t_service_provider驱动t_interface数据量上来可以在t_interface ServiceProviderId字段建立索引

View File

@ -3,12 +3,12 @@ namespace InterfaceForward.Repositories;
public static class SugarQueryableExtensions
{
public static async Task<PagedListDto<TEntity>> ToPagedListAsync<TEntity>(this ISugarQueryable<TEntity> query,
public static async Task<PagedResult<TEntity>> ToPagedListAsync<TEntity>(this ISugarQueryable<TEntity> query,
int pageIndex, int pageSize) where TEntity : class
{
RefAsync<int> totalCount = 0;
var items = await query.ToPageListAsync(pageIndex, pageSize, totalCount);
return new PagedListDto<TEntity>(items, totalCount);
return new PagedResult<TEntity>(totalCount, items);
}
}