temp
This commit is contained in:
parent
512c511707
commit
4262004ae6
@ -16,7 +16,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\InterfaceForward.Application\InterfaceForward.Application.csproj" />
|
<ProjectReference Include="..\InterfaceForward.Application\InterfaceForward.Application.csproj" />
|
||||||
<ProjectReference Include="..\InterfaceForward.ServiceDefaults\InterfaceForward.ServiceDefaults.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.AspNetCore" Version="8.0.1" />
|
||||||
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="10.0.0" />
|
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="10.0.0" />
|
||||||
|
|||||||
@ -21,9 +21,9 @@ public class InterfaceForwardApiModule : FakeModule
|
|||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
services.AddProblemDetails();
|
services.AddProblemDetails();
|
||||||
|
|
||||||
services.Configure<RemoteServiceConventionOptions>(options =>
|
services.Configure<ApplicationService2ControllerOptions>(options =>
|
||||||
{
|
{
|
||||||
options.AddAssembly(typeof(InterfaceForwardApplicationModule).Assembly);
|
options.ScanApplicationServices<InterfaceForwardApplicationModule>();
|
||||||
});
|
});
|
||||||
|
|
||||||
services.AddFakeSwaggerGen()
|
services.AddFakeSwaggerGen()
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Aspire.Hosting" Version="8.0.0-preview.1.23557.2"/>
|
<PackageReference Include="Aspire.Hosting" Version="8.2.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
using Fake.DomainDrivenDesign.Application.Dtos;
|
namespace InterfaceForward.Application.Contracts.ForwardCore;
|
||||||
|
|
||||||
namespace InterfaceForward.Application.Contracts.ForwardCore;
|
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class InterfaceRelayUnifyResultDto
|
public class InterfaceRelayUnifyResultDto
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<Import Project="../../common.props" />
|
<Import Project="../../common.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Fake.Application;
|
||||||
using Fake.AspNetCore.Http;
|
using Fake.AspNetCore.Http;
|
||||||
using InterfaceForward.Repositories;
|
using InterfaceForward.Repositories;
|
||||||
using InterfaceForward.Repositories.Log.Services;
|
using InterfaceForward.Repositories.Log.Services;
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using System.Text;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using Fake.Application;
|
||||||
using InterfaceForward.Application.Contracts.ForwardCore;
|
using InterfaceForward.Application.Contracts.ForwardCore;
|
||||||
using InterfaceForward.Application.Helpers;
|
using InterfaceForward.Application.Helpers;
|
||||||
using InterfaceForward.Application.OSS;
|
using InterfaceForward.Application.OSS;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Global using directives
|
// Global using directives
|
||||||
|
|
||||||
global using Fake;
|
global using Fake;
|
||||||
global using Fake.DomainDrivenDesign.Application;
|
global using Fake.Application;
|
||||||
global using Fake.DomainDrivenDesign.Application.Dtos;
|
global using Fake.Application.Dtos;
|
||||||
global using InterfaceForward.Domain.Shared.Helpers;
|
global using InterfaceForward.Domain.Shared.Helpers;
|
||||||
@ -17,9 +17,9 @@
|
|||||||
<PackageReference Include="DiffPlex" Version="1.7.2" />
|
<PackageReference Include="DiffPlex" Version="1.7.2" />
|
||||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||||
<PackageReference Include="DotNetCore.Natasha.CSharp" Version="5.2.2.1"/>
|
<PackageReference Include="DotNetCore.Natasha.CSharp" Version="5.2.2.1"/>
|
||||||
<PackageReference Include="Fake.AspNetCore" Version="8.0.0-preview8.5" />
|
<PackageReference Include="Fake.AspNetCore" Version="8.0.1" />
|
||||||
<PackageReference Include="Fake.EventBus.RabbitMQ" Version="1.0.0" />
|
<PackageReference Include="Fake.EventBus.RabbitMQ" Version="8.0.1" />
|
||||||
<PackageReference Include="Fake.ObjectMapping.AutoMapper" Version="8.0.0-preview8.5" />
|
<PackageReference Include="Fake.ObjectMapping.AutoMapper" Version="8.0.1" />
|
||||||
<PackageReference Include="FreeRedis" Version="1.2.15" />
|
<PackageReference Include="FreeRedis" Version="1.2.15" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ public class InterfaceForwardApplicationModule:FakeModule
|
|||||||
|
|
||||||
context.Services.Configure<FakeAutoMapperOptions>(options =>
|
context.Services.Configure<FakeAutoMapperOptions>(options =>
|
||||||
{
|
{
|
||||||
options.AddMaps<InterfaceForwardApplicationModule>();
|
options.ScanProfiles<InterfaceForwardApplicationModule>();
|
||||||
});
|
});
|
||||||
|
|
||||||
context.Services.Configure<InterfaceRelayOptions>(configuration.GetSection("InterfaceRelay"));
|
context.Services.Configure<InterfaceRelayOptions>(configuration.GetSection("InterfaceRelay"));
|
||||||
|
|||||||
@ -1,22 +1,38 @@
|
|||||||
|
using System.Text;
|
||||||
using Fake.RabbitMQ;
|
using Fake.RabbitMQ;
|
||||||
|
using InterfaceForward.Domain.Shared;
|
||||||
|
using RabbitMQ.Client;
|
||||||
|
using RabbitMQ.Client.Events;
|
||||||
|
|
||||||
namespace InterfaceForward.Application.Rabbit;
|
namespace InterfaceForward.Application.Rabbit;
|
||||||
|
|
||||||
public class RabbitClient(IRabbitMqConnector connector)
|
public class RabbitClient(IRabbitMqChannelPool channelPool)
|
||||||
{
|
{
|
||||||
public void Subscribe(ConsumeOptions consumeOptions)
|
public void Subscribe(ConsumeOptions consumeOptions)
|
||||||
{
|
{
|
||||||
using var channel = connector.CreateChannel();
|
using var channelAccessor = channelPool.Acquire(consumeOptions.Queue, configureChannel: channel =>
|
||||||
var consumer = new EventingBasicConsumer(channel);
|
{
|
||||||
consumer.Received += (model, ea) =>
|
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 body = ea.Body.ToArray();
|
||||||
var message = Encoding.UTF8.GetString(body);
|
var message = Encoding.UTF8.GetString(body);
|
||||||
Console.WriteLine(" [x] Received {0}", message);
|
Console.WriteLine(" [x] Received {0}", message);
|
||||||
};
|
};
|
||||||
|
|
||||||
channel.BasicConsume(queue: consumeOptions.Queue,
|
channel.BasicConsume(queue: consumeOptions.Queue,
|
||||||
autoAck: true,
|
autoAck: false,
|
||||||
consumer: consumer);
|
consumer: consumer);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ public class AppsService : BaseService
|
|||||||
/// <param name="input">入参</param>
|
/// <param name="input">入参</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("GetList")]
|
[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()
|
var res = await _appRepository.AsQueryable()
|
||||||
.Select(x => new AppListOutput { Id = x.Id.SelectAll() })
|
.Select(x => new AppListOutput { Id = x.Id.SelectAll() })
|
||||||
|
|||||||
@ -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.Services;
|
||||||
using InterfaceForward.Repositories.Log.ValueObjects;
|
using InterfaceForward.Repositories.Log.ValueObjects;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@ -32,11 +31,11 @@ namespace InterfaceForward.Application.Services.App
|
|||||||
/// <param name="input">入参</param>
|
/// <param name="input">入参</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("GetList")]
|
[HttpGet("GetList")]
|
||||||
public async Task<PagedListDto<LogIndex>> GetList(LogGetListInputValueObject input)
|
public async Task<PagedResult<LogIndex>> GetList(LogGetListInputValueObject input)
|
||||||
{
|
{
|
||||||
var res = await _logRepository.GetListAsync(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>
|
/// <summary>
|
||||||
@ -45,7 +44,7 @@ namespace InterfaceForward.Application.Services.App
|
|||||||
/// <param name="input">入参</param>
|
/// <param name="input">入参</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("GetLogsStatistics")]
|
[HttpGet("GetLogsStatistics")]
|
||||||
public async Task<PagedListDto<LogGetListOutputValueObject>> GetLogsStatistics(LogStatisticsInputValueObject input)
|
public async Task<PagedResult<LogGetListOutputValueObject>> GetLogsStatistics(LogStatisticsInputValueObject input)
|
||||||
{
|
{
|
||||||
var esData = await _logRepository.GetLogsStatisticsAsync(input);
|
var esData = await _logRepository.GetLogsStatisticsAsync(input);
|
||||||
|
|
||||||
@ -88,7 +87,7 @@ namespace InterfaceForward.Application.Services.App
|
|||||||
.Skip((input.PageIndex - 1) * input.PageSize)
|
.Skip((input.PageIndex - 1) * input.PageSize)
|
||||||
.Take(input.PageSize).ToList();
|
.Take(input.PageSize).ToList();
|
||||||
|
|
||||||
return new PagedListDto<LogGetListOutputValueObject>(res, list.Count);
|
return new PagedResult<LogGetListOutputValueObject>(list.Count, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
namespace InterfaceForward.Application.Services;
|
using Fake.Application;
|
||||||
|
|
||||||
|
namespace InterfaceForward.Application.Services;
|
||||||
|
|
||||||
public abstract class BaseService : ApplicationService
|
public abstract class BaseService : ApplicationService
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public class ServiceProviderInterfaceService : BaseService
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("Interface/ServiceProviderInterfacePaginatedList")]
|
[HttpPost("Interface/ServiceProviderInterfacePaginatedList")]
|
||||||
public async Task<PagedListDto<ServiceProviderInterfacePaginatedOutputValueObject>>
|
public async Task<PagedResult<ServiceProviderInterfacePaginatedOutputValueObject>>
|
||||||
ServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input)
|
ServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input)
|
||||||
{
|
{
|
||||||
return await InterfaceRepository.GetServiceProviderInterfacePaginatedListAsync(input);
|
return await InterfaceRepository.GetServiceProviderInterfacePaginatedListAsync(input);
|
||||||
|
|||||||
@ -49,7 +49,7 @@ public class SystemInterfaceService : BaseService
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("Interface/SystemInterfacePaginatedList")]
|
[HttpPost("Interface/SystemInterfacePaginatedList")]
|
||||||
public async Task<PagedListDto<SystemInterfacePaginatedOutputValueObject>>
|
public async Task<PagedResult<SystemInterfacePaginatedOutputValueObject>>
|
||||||
SystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input)
|
SystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input)
|
||||||
{
|
{
|
||||||
return await _interfaceRepository.GetSystemInterfacePaginatedListAsync(input);
|
return await _interfaceRepository.GetSystemInterfacePaginatedListAsync(input);
|
||||||
|
|||||||
@ -96,7 +96,7 @@ public partial class InterfaceMapService : ApplicationService
|
|||||||
/// <param name="inputVo"></param>
|
/// <param name="inputVo"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("InterfaceMap/GetMapList")]
|
[HttpGet("InterfaceMap/GetMapList")]
|
||||||
public async Task<PagedListDto<InterfaceMapOutputValueObject>> GetMapListByIdAsync(GetMapListInputVO inputVo)
|
public async Task<PagedResult<InterfaceMapOutputValueObject>> GetMapListByIdAsync(GetMapListInputVO inputVo)
|
||||||
{
|
{
|
||||||
return await _interfaceMapRepository.GetMapListAsync(inputVo);
|
return await _interfaceMapRepository.GetMapListAsync(inputVo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,12 +191,12 @@ public class ServiceProviderAccountService : BaseService
|
|||||||
/// <param name="pageSize">页大小</param>
|
/// <param name="pageSize">页大小</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("ServiceProviderAccount/GetAccountPageList")]
|
[HttpGet("ServiceProviderAccount/GetAccountPageList")]
|
||||||
public async Task<PagedListDto<Dictionary<string, object?>>> GetAccountPageListAsync(
|
public async Task<PagedResult<Dictionary<string, object?>>> GetAccountPageListAsync(
|
||||||
[Required] int serviceProviderId
|
[Required] int serviceProviderId
|
||||||
, int pageIndex = 1
|
, int pageIndex = 1
|
||||||
, int pageSize = 50)
|
, int pageSize = 50)
|
||||||
{
|
{
|
||||||
var res = new PagedListDto<Dictionary<string, object?>>();
|
var res = new PagedResult<Dictionary<string, object?>>();
|
||||||
|
|
||||||
// 获取账户列表分页数据
|
// 获取账户列表分页数据
|
||||||
var data = await _serviceProviderAccountRepository.GetAccountPageListAsync(serviceProviderId, pageIndex,
|
var data = await _serviceProviderAccountRepository.GetAccountPageListAsync(serviceProviderId, pageIndex,
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class ServiceProviderService : BaseService
|
|||||||
/// <param name="input">入参</param>
|
/// <param name="input">入参</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("ServiceProvider/PaginatedList")]
|
[HttpPost("ServiceProvider/PaginatedList")]
|
||||||
public async Task<PagedListDto<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
|
public async Task<PagedResult<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
|
||||||
ServiceProviderPaginatedInputObjectValue input)
|
ServiceProviderPaginatedInputObjectValue input)
|
||||||
{
|
{
|
||||||
return await _serviceProviderRepository.GetPaginatedListAsync(input);
|
return await _serviceProviderRepository.GetPaginatedListAsync(input);
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using Fake;
|
using Fake;
|
||||||
|
using Fake.Application;
|
||||||
using InterfaceForward.Domain.Shared.Dtos;
|
using InterfaceForward.Domain.Shared.Dtos;
|
||||||
using InterfaceForward.Domain.Shared.Enum;
|
using InterfaceForward.Domain.Shared.Enum;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Import Project="../../common.props"/>
|
<Import Project="../../common.props"/>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -11,6 +11,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Fake.DomainDrivenDesign" Version="8.0.0-preview8.5" />
|
<PackageReference Include="Fake.DomainDrivenDesign" Version="8.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
/// 应用表
|
/// 应用表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_app")]
|
[SugarTable("t_app")]
|
||||||
public class AppEntity : FullAuditedAggregate<int>
|
public class AppEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 自增主键
|
/// 自增主键
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
/// 应用可用接口表
|
/// 应用可用接口表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_app_scope")]
|
[SugarTable("t_app_scope")]
|
||||||
public class AppScopeEntity : FullAuditedAggregate<int>
|
public class AppScopeEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 自增主键
|
/// 自增主键
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using Fake;
|
using Fake.Domain.Entities;
|
||||||
using Fake.DomainDrivenDesign.Entities;
|
|
||||||
using Fake.DomainDrivenDesign.Repositories.SqlSugarCore;
|
using Fake.DomainDrivenDesign.Repositories.SqlSugarCore;
|
||||||
using Fake.UnitOfWork;
|
|
||||||
|
|
||||||
namespace InterfaceForward.Repositories;
|
namespace InterfaceForward.Repositories;
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
/// 字典表
|
/// 字典表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_dictionary")]
|
[SugarTable("t_dictionary")]
|
||||||
public class DictionaryEntity : FullAuditedAggregate<int>
|
public class DictionaryEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
|
|
||||||
///<summary>
|
///<summary>
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
// Global using directives
|
// Global using directives
|
||||||
|
|
||||||
|
global using Fake.Application;
|
||||||
|
global using Fake.Application.Dtos;
|
||||||
global using Fake.DependencyInjection;
|
global using Fake.DependencyInjection;
|
||||||
|
global using Fake.Domain.Entities.Auditing;
|
||||||
global using Fake.DomainDrivenDesign;
|
global using Fake.DomainDrivenDesign;
|
||||||
global using Fake.DomainDrivenDesign.Application.Dtos;
|
|
||||||
global using Fake.DomainDrivenDesign.Entities.Auditing;
|
|
||||||
global using SqlSugar;
|
global using SqlSugar;
|
||||||
@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.Interface.Entitys;
|
|||||||
/// 接口表
|
/// 接口表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_interface")]
|
[SugarTable("t_interface")]
|
||||||
public class InterfaceEntity : FullAuditedAggregate<int>
|
public class InterfaceEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
|
|
||||||
///<summary>
|
///<summary>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
/// 接口映射明细表
|
/// 接口映射明细表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_interface_map_detail")]
|
[SugarTable("t_interface_map_detail")]
|
||||||
public class InterfaceMapDetailEntity: FullAuditedAggregate<int>
|
public class InterfaceMapDetailEntity: FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 映射明细id
|
/// 映射明细id
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
/// 接口映射表
|
/// 接口映射表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_interface_map")]
|
[SugarTable("t_interface_map")]
|
||||||
public class InterfaceMapEntity : FullAuditedAggregate<int>
|
public class InterfaceMapEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
|
|
||||||
///<summary>
|
///<summary>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Fake.DomainDrivenDesign.Entities;
|
using Fake.Domain.Entities;
|
||||||
|
|
||||||
namespace InterfaceForward.Repositories.Interface.Entitys;
|
namespace InterfaceForward.Repositories.Interface.Entitys;
|
||||||
|
|
||||||
@ -69,4 +69,6 @@ public class InterfaceMapPublishedEntity: CreateAuditedEntity<int>,IAggregateRoo
|
|||||||
/// <summary>创建时间</summary>
|
/// <summary>创建时间</summary>
|
||||||
[SugarColumn(ColumnName = "CreateTime")]
|
[SugarColumn(ColumnName = "CreateTime")]
|
||||||
public virtual DateTime? CreateTime { get; set; }
|
public virtual DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
|
public Guid ConcurrencyStamp { get; set; }
|
||||||
}
|
}
|
||||||
@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.Interface.Entitys;
|
|||||||
/// 接口返回配置
|
/// 接口返回配置
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_interface_return_config")]
|
[SugarTable("t_interface_return_config")]
|
||||||
public class InterfaceReturnConfigEntity : FullAuditedAggregate<int>
|
public class InterfaceReturnConfigEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 自增主键
|
/// 自增主键
|
||||||
|
|||||||
@ -13,7 +13,7 @@ namespace InterfaceForward.Repositories.Interface.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inputVo"></param>
|
/// <param name="inputVo"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<PagedListDto<InterfaceMapOutputValueObject>> GetMapListAsync(GetMapListInputVO inputVo);
|
Task<PagedResult<InterfaceMapOutputValueObject>> GetMapListAsync(GetMapListInputVO inputVo);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取参数映射列表
|
/// 获取参数映射列表
|
||||||
|
|||||||
@ -17,14 +17,14 @@ namespace InterfaceForward.Repositories.Interface.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<PagedListDto<SystemInterfacePaginatedOutputValueObject>> GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input);
|
Task<PagedResult<SystemInterfacePaginatedOutputValueObject>> GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取服务商接口分页
|
/// 获取服务商接口分页
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<PagedListDto<ServiceProviderInterfacePaginatedOutputValueObject>> GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input);
|
Task<PagedResult<ServiceProviderInterfacePaginatedOutputValueObject>> GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取参数列表
|
/// 获取参数列表
|
||||||
|
|||||||
@ -15,7 +15,7 @@ public class InterfaceMapRepository : BasicRepository<InterfaceMapEntity>, IScop
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inputVo"></param>
|
/// <param name="inputVo"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<PagedListDto<InterfaceMapOutputValueObject>> GetMapListAsync(GetMapListInputVO inputVo)
|
public async Task<PagedResult<InterfaceMapOutputValueObject>> GetMapListAsync(GetMapListInputVO inputVo)
|
||||||
{
|
{
|
||||||
// 上下游一对多关系
|
// 上下游一对多关系
|
||||||
var query = Context.Queryable<InterfaceMapEntity>()
|
var query = Context.Queryable<InterfaceMapEntity>()
|
||||||
|
|||||||
@ -16,7 +16,7 @@ public class InterfaceRepository : BasicRepository<InterfaceEntity>, IInterfaceR
|
|||||||
public string InterfaceGroup => "InterfaceGroup";
|
public string InterfaceGroup => "InterfaceGroup";
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<PagedListDto<SystemInterfacePaginatedOutputValueObject>>
|
public async Task<PagedResult<SystemInterfacePaginatedOutputValueObject>>
|
||||||
GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input)
|
GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input)
|
||||||
{
|
{
|
||||||
// t_interface驱动t_interface_map,数据量上来可以在t_interface_map UpStreamId字段建立索引
|
// t_interface驱动t_interface_map,数据量上来可以在t_interface_map UpStreamId字段建立索引
|
||||||
@ -47,7 +47,7 @@ public class InterfaceRepository : BasicRepository<InterfaceEntity>, IInterfaceR
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<PagedListDto<ServiceProviderInterfacePaginatedOutputValueObject>>
|
public async Task<PagedResult<ServiceProviderInterfacePaginatedOutputValueObject>>
|
||||||
GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input)
|
GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input)
|
||||||
{
|
{
|
||||||
var query = AsQueryable()
|
var query = AsQueryable()
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<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" />
|
<PackageReference Include="NEST" Version="7.17.5" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@ -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.Enum;
|
||||||
using InterfaceForward.Domain.Shared.Helpers;
|
using InterfaceForward.Domain.Shared.Helpers;
|
||||||
using InterfaceForward.Repositories.App.Entitys;
|
using InterfaceForward.Repositories.App.Entitys;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
/// 固定参数
|
/// 固定参数
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_parameter_fixed")]
|
[SugarTable("t_parameter_fixed")]
|
||||||
public class FixedParameterEntity : FullAuditedAggregate<int>
|
public class FixedParameterEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
|
|
||||||
///<summary>
|
///<summary>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
/// 表单参数
|
/// 表单参数
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_parameter_form")]
|
[SugarTable("t_parameter_form")]
|
||||||
public class FormParameterEntity : FullAuditedAggregate<int>
|
public class FormParameterEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 自增主键
|
/// 自增主键
|
||||||
|
|||||||
@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.Interface.Entitys
|
|||||||
/// 参数表
|
/// 参数表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_parameter")]
|
[SugarTable("t_parameter")]
|
||||||
public class ParameterEntity : FullAuditedAggregate<int>
|
public class ParameterEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
|
|
||||||
///<summary>
|
///<summary>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
/// 服务商账户表
|
/// 服务商账户表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_service_provider_account")]
|
[SugarTable("t_service_provider_account")]
|
||||||
public class ServiceProviderAccountEntity : FullAuditedAggregate<int>
|
public class ServiceProviderAccountEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 自增主键
|
/// 自增主键
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/// 服务商账户字段表
|
/// 服务商账户字段表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_service_provider_account_field")]
|
[SugarTable("t_service_provider_account_field")]
|
||||||
public class ServiceProviderAccountFieldEntity : FullAuditedAggregate<int>
|
public class ServiceProviderAccountFieldEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
|
|
||||||
///<summary>
|
///<summary>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Fake.DomainDrivenDesign.Entities;
|
using Fake.Domain.Entities;
|
||||||
|
|
||||||
namespace InterfaceForward.Repositories.ServiceProvider.Entitys;
|
namespace InterfaceForward.Repositories.ServiceProvider.Entitys;
|
||||||
|
|
||||||
@ -7,7 +7,7 @@ namespace InterfaceForward.Repositories.ServiceProvider.Entitys;
|
|||||||
/// 服务商账户授权表
|
/// 服务商账户授权表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_service_provider_account_field_value")]
|
[SugarTable("t_service_provider_account_field_value")]
|
||||||
public class ServiceProviderAccountFieldValueEntity: Entity<int>, IAggregateRoot
|
public class ServiceProviderAccountFieldValueEntity: AggregateRoot<int>
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 自增主键
|
/// 自增主键
|
||||||
|
|||||||
@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.ServiceProvider.Entitys;
|
|||||||
/// 服务商授权配置表
|
/// 服务商授权配置表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_service_provider_auth_config")]
|
[SugarTable("t_service_provider_auth_config")]
|
||||||
public class ServiceProviderAuthConfigEntity: FullAuditedAggregate<int>
|
public class ServiceProviderAuthConfigEntity: FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 自增主键
|
/// 自增主键
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
/// 服务商主表
|
/// 服务商主表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("t_service_provider")]
|
[SugarTable("t_service_provider")]
|
||||||
public class ServiceProviderEntity : FullAuditedAggregate<int>
|
public class ServiceProviderEntity : FullAuditedAggregateRoot<int>
|
||||||
{
|
{
|
||||||
|
|
||||||
///<summary>
|
///<summary>
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using InterfaceForward.Domain.Shared.Dtos;
|
using InterfaceForward.Repositories.ServiceProvider.Entitys;
|
||||||
using InterfaceForward.Repositories.ServiceProvider.Entitys;
|
|
||||||
using InterfaceForward.Repositories.ServiceProvider.ValueObjects;
|
using InterfaceForward.Repositories.ServiceProvider.ValueObjects;
|
||||||
|
|
||||||
namespace InterfaceForward.Repositories.ServiceProvider.Services;
|
namespace InterfaceForward.Repositories.ServiceProvider.Services;
|
||||||
@ -30,7 +29,7 @@ public interface IServiceProviderAccountRepository : IBasicRepository<ServicePro
|
|||||||
/// <param name="pageIndex"></param>
|
/// <param name="pageIndex"></param>
|
||||||
/// <param name="pageSize"></param>
|
/// <param name="pageSize"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<PagedListDto<ServiceProviderAccountPageValueObject>> GetAccountPageListAsync(int serviceProviderId,
|
Task<PagedResult<ServiceProviderAccountPageValueObject>> GetAccountPageListAsync(int serviceProviderId,
|
||||||
int pageIndex, int pageSize);
|
int pageIndex, int pageSize);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ namespace InterfaceForward.Repositories.ServiceProvider.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<PagedListDto<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
|
Task<PagedResult<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
|
||||||
ServiceProviderPaginatedInputObjectValue input);
|
ServiceProviderPaginatedInputObjectValue input);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -20,7 +20,7 @@ public class ServiceProviderAccountRepository : BasicRepository<ServiceProviderA
|
|||||||
.ExecuteCommandAsync();
|
.ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<PagedListDto<ServiceProviderAccountPageValueObject>> GetAccountPageListAsync(
|
public async Task<PagedResult<ServiceProviderAccountPageValueObject>> GetAccountPageListAsync(
|
||||||
int serviceProviderId, int pageIndex, int pageSize)
|
int serviceProviderId, int pageIndex, int pageSize)
|
||||||
{
|
{
|
||||||
return await Context.Queryable<ServiceProviderAccountEntity>()
|
return await Context.Queryable<ServiceProviderAccountEntity>()
|
||||||
|
|||||||
@ -13,7 +13,7 @@ public class ServiceProviderRepository : BasicRepository<ServiceProviderEntity>,
|
|||||||
IServiceProviderRepository
|
IServiceProviderRepository
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<PagedListDto<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
|
public async Task<PagedResult<ServiceProviderPaginatedOutputValueObject>> GetPaginatedListAsync(
|
||||||
ServiceProviderPaginatedInputObjectValue input)
|
ServiceProviderPaginatedInputObjectValue input)
|
||||||
{
|
{
|
||||||
// t_service_provider驱动t_interface,数据量上来可以在t_interface ServiceProviderId字段建立索引
|
// t_service_provider驱动t_interface,数据量上来可以在t_interface ServiceProviderId字段建立索引
|
||||||
|
|||||||
@ -3,12 +3,12 @@ namespace InterfaceForward.Repositories;
|
|||||||
|
|
||||||
public static class SugarQueryableExtensions
|
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
|
int pageIndex, int pageSize) where TEntity : class
|
||||||
{
|
{
|
||||||
RefAsync<int> totalCount = 0;
|
RefAsync<int> totalCount = 0;
|
||||||
var items = await query.ToPageListAsync(pageIndex, pageSize, totalCount);
|
var items = await query.ToPageListAsync(pageIndex, pageSize, totalCount);
|
||||||
|
|
||||||
return new PagedListDto<TEntity>(items, totalCount);
|
return new PagedResult<TEntity>(totalCount, items);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user