From 4262004ae6c2764d87dc878236efe6412a621d64 Mon Sep 17 00:00:00 2001 From: xiaolipro <2357729423@qq.com> Date: Tue, 10 Dec 2024 18:02:37 +0800 Subject: [PATCH] temp --- .../InterfaceForward.Api.csproj | 2 +- .../InterfaceForwardApiModule.cs | 4 +- .../InterfaceForward.AppHost.csproj | 2 +- .../InterfaceRelayUnifyResultDto.cs | 4 +- ...erfaceForward.Application.Contracts.csproj | 2 +- .../Filters/ForwardAuthorizeFilter.cs | 1 + .../ForwardCore/DefaultForwardFlow.cs | 1 + .../GlobalUsings.cs | 4 +- .../InterfaceForward.Application.csproj | 6 +-- .../InterfaceForwardApplicationModule.cs | 2 +- .../Rabbit/RabbitClient.cs | 40 +++++++++++++------ .../Services/App/AppsService.cs | 2 +- .../Services/App/LogService.cs | 11 +++-- .../Services/BaseService.cs | 4 +- .../ServiceProviderInterfaceService.cs | 2 +- .../Interface/SystemInterfaceService.cs | 2 +- .../InterfaceMap/InterfaceMapService.cs | 2 +- .../ServiceProviderAccountService.cs | 4 +- .../ServiceProvider/ServiceProviderService.cs | 2 +- .../Helpers/JsonHelper.cs | 1 + .../InterfaceForward.Domain.Shared.csproj | 4 +- .../App/Entitys/AppEntity.cs | 2 +- .../App/Entitys/AppScopeEntity.cs | 2 +- .../BasicRepository.cs | 4 +- .../Dictionary/Entitys/DictionaryEntity.cs | 2 +- .../GlobalUsings.cs | 5 ++- .../Interface/Entitys/InterfaceEntity.cs | 2 +- .../Entitys/InterfaceMapDetailEntity.cs | 2 +- .../Interface/Entitys/InterfaceMapEntity.cs | 2 +- .../Entitys/InterfaceMapPublishedEntity.cs | 4 +- .../Entitys/InterfaceReturnConfigEntity.cs | 2 +- .../Services/IInterfaceMapRepository.cs | 2 +- .../Services/IInterfaceRepository.cs | 4 +- .../Services/InterfaceMapRepository.cs | 2 +- .../Interface/Services/InterfaceRepository.cs | 4 +- .../InterfaceForward.Repositories.csproj | 2 +- .../InterfaceForwardQuery.cs | 3 +- .../Entities/FixedParameterEntity.cs | 2 +- .../Parameter/Entities/FormParameterEntity.cs | 2 +- .../Parameter/Entities/ParameterEntity.cs | 2 +- .../Entitys/ServiceProviderAccountEntity.cs | 2 +- .../ServiceProviderAccountFieldEntity.cs | 2 +- .../ServiceProviderAccountFieldValueEntity.cs | 4 +- .../ServiceProviderAuthConfigEntity.cs | 2 +- .../Entitys/ServiceProviderEntity.cs | 2 +- .../IServiceProviderAccountRepository.cs | 5 +-- .../Services/IServiceProviderRepository.cs | 2 +- .../ServiceProviderAccountRepository.cs | 2 +- .../Services/ServiceProviderRepository.cs | 2 +- .../SugarQueryableExtensions.cs | 4 +- 50 files changed, 98 insertions(+), 81 deletions(-) diff --git a/src/InterfaceForward.Api/InterfaceForward.Api.csproj b/src/InterfaceForward.Api/InterfaceForward.Api.csproj index 7672114..80f0b6e 100644 --- a/src/InterfaceForward.Api/InterfaceForward.Api.csproj +++ b/src/InterfaceForward.Api/InterfaceForward.Api.csproj @@ -16,7 +16,7 @@ - + diff --git a/src/InterfaceForward.Api/InterfaceForwardApiModule.cs b/src/InterfaceForward.Api/InterfaceForwardApiModule.cs index 704199d..c9fa24b 100644 --- a/src/InterfaceForward.Api/InterfaceForwardApiModule.cs +++ b/src/InterfaceForward.Api/InterfaceForwardApiModule.cs @@ -21,9 +21,9 @@ public class InterfaceForwardApiModule : FakeModule // Add services to the container. services.AddProblemDetails(); - services.Configure(options => + services.Configure(options => { - options.AddAssembly(typeof(InterfaceForwardApplicationModule).Assembly); + options.ScanApplicationServices(); }); services.AddFakeSwaggerGen() diff --git a/src/InterfaceForward.AppHost/InterfaceForward.AppHost.csproj b/src/InterfaceForward.AppHost/InterfaceForward.AppHost.csproj index 5308000..fc02db9 100644 --- a/src/InterfaceForward.AppHost/InterfaceForward.AppHost.csproj +++ b/src/InterfaceForward.AppHost/InterfaceForward.AppHost.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/InterfaceForward.Application.Contracts/ForwardCore/InterfaceRelayUnifyResultDto.cs b/src/InterfaceForward.Application.Contracts/ForwardCore/InterfaceRelayUnifyResultDto.cs index 2267827..f548b5e 100644 --- a/src/InterfaceForward.Application.Contracts/ForwardCore/InterfaceRelayUnifyResultDto.cs +++ b/src/InterfaceForward.Application.Contracts/ForwardCore/InterfaceRelayUnifyResultDto.cs @@ -1,6 +1,4 @@ -using Fake.DomainDrivenDesign.Application.Dtos; - -namespace InterfaceForward.Application.Contracts.ForwardCore; +namespace InterfaceForward.Application.Contracts.ForwardCore; [Serializable] public class InterfaceRelayUnifyResultDto diff --git a/src/InterfaceForward.Application.Contracts/InterfaceForward.Application.Contracts.csproj b/src/InterfaceForward.Application.Contracts/InterfaceForward.Application.Contracts.csproj index 9cd872b..4765b40 100644 --- a/src/InterfaceForward.Application.Contracts/InterfaceForward.Application.Contracts.csproj +++ b/src/InterfaceForward.Application.Contracts/InterfaceForward.Application.Contracts.csproj @@ -3,7 +3,7 @@ - netstandard2.1 + net8.0 diff --git a/src/InterfaceForward.Application/Filters/ForwardAuthorizeFilter.cs b/src/InterfaceForward.Application/Filters/ForwardAuthorizeFilter.cs index fd90df3..440705b 100644 --- a/src/InterfaceForward.Application/Filters/ForwardAuthorizeFilter.cs +++ b/src/InterfaceForward.Application/Filters/ForwardAuthorizeFilter.cs @@ -1,4 +1,5 @@ using System.Text; +using Fake.Application; using Fake.AspNetCore.Http; using InterfaceForward.Repositories; using InterfaceForward.Repositories.Log.Services; diff --git a/src/InterfaceForward.Application/ForwardCore/DefaultForwardFlow.cs b/src/InterfaceForward.Application/ForwardCore/DefaultForwardFlow.cs index a7206c7..ef4afb2 100644 --- a/src/InterfaceForward.Application/ForwardCore/DefaultForwardFlow.cs +++ b/src/InterfaceForward.Application/ForwardCore/DefaultForwardFlow.cs @@ -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; diff --git a/src/InterfaceForward.Application/GlobalUsings.cs b/src/InterfaceForward.Application/GlobalUsings.cs index b542bf7..f038792 100644 --- a/src/InterfaceForward.Application/GlobalUsings.cs +++ b/src/InterfaceForward.Application/GlobalUsings.cs @@ -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; \ No newline at end of file diff --git a/src/InterfaceForward.Application/InterfaceForward.Application.csproj b/src/InterfaceForward.Application/InterfaceForward.Application.csproj index e8ef809..3b0cd07 100644 --- a/src/InterfaceForward.Application/InterfaceForward.Application.csproj +++ b/src/InterfaceForward.Application/InterfaceForward.Application.csproj @@ -17,9 +17,9 @@ - - - + + + diff --git a/src/InterfaceForward.Application/InterfaceForwardApplicationModule.cs b/src/InterfaceForward.Application/InterfaceForwardApplicationModule.cs index d8595b7..84d3dab 100644 --- a/src/InterfaceForward.Application/InterfaceForwardApplicationModule.cs +++ b/src/InterfaceForward.Application/InterfaceForwardApplicationModule.cs @@ -21,7 +21,7 @@ public class InterfaceForwardApplicationModule:FakeModule context.Services.Configure(options => { - options.AddMaps(); + options.ScanProfiles(); }); context.Services.Configure(configuration.GetSection("InterfaceRelay")); diff --git a/src/InterfaceForward.Application/Rabbit/RabbitClient.cs b/src/InterfaceForward.Application/Rabbit/RabbitClient.cs index 6913ab7..5128921 100644 --- a/src/InterfaceForward.Application/Rabbit/RabbitClient.cs +++ b/src/InterfaceForward.Application/Rabbit/RabbitClient.cs @@ -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) => - { - var body = ea.Body.ToArray(); - var message = Encoding.UTF8.GetString(body); - Console.WriteLine(" [x] Received {0}", message); - }; - channel.BasicConsume(queue: consumeOptions.Queue, - autoAck: true, - consumer: consumer); + 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: false, + consumer: consumer); + }); } } diff --git a/src/InterfaceForward.Application/Services/App/AppsService.cs b/src/InterfaceForward.Application/Services/App/AppsService.cs index 42cd0ab..4af8fa6 100644 --- a/src/InterfaceForward.Application/Services/App/AppsService.cs +++ b/src/InterfaceForward.Application/Services/App/AppsService.cs @@ -47,7 +47,7 @@ public class AppsService : BaseService /// 入参 /// [HttpGet("GetList")] - public async Task> GetList([FromQuery] PagedQueryInput input) + public async Task> GetList([FromQuery] PagedQueryInput input) { var res = await _appRepository.AsQueryable() .Select(x => new AppListOutput { Id = x.Id.SelectAll() }) diff --git a/src/InterfaceForward.Application/Services/App/LogService.cs b/src/InterfaceForward.Application/Services/App/LogService.cs index 39d3243..e28001b 100644 --- a/src/InterfaceForward.Application/Services/App/LogService.cs +++ b/src/InterfaceForward.Application/Services/App/LogService.cs @@ -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 /// 入参 /// [HttpGet("GetList")] - public async Task> GetList(LogGetListInputValueObject input) + public async Task> GetList(LogGetListInputValueObject input) { var res = await _logRepository.GetListAsync(input); - return new PagedListDto(res.list, (int)res.total); + return new PagedResult(res.total, res.list); } /// @@ -45,7 +44,7 @@ namespace InterfaceForward.Application.Services.App /// 入参 /// [HttpGet("GetLogsStatistics")] - public async Task> GetLogsStatistics(LogStatisticsInputValueObject input) + public async Task> 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(res, list.Count); + return new PagedResult(list.Count, res); } /// diff --git a/src/InterfaceForward.Application/Services/BaseService.cs b/src/InterfaceForward.Application/Services/BaseService.cs index 6385c2f..f6503a0 100644 --- a/src/InterfaceForward.Application/Services/BaseService.cs +++ b/src/InterfaceForward.Application/Services/BaseService.cs @@ -1,4 +1,6 @@ -namespace InterfaceForward.Application.Services; +using Fake.Application; + +namespace InterfaceForward.Application.Services; public abstract class BaseService : ApplicationService { diff --git a/src/InterfaceForward.Application/Services/Interface/ServiceProviderInterfaceService.cs b/src/InterfaceForward.Application/Services/Interface/ServiceProviderInterfaceService.cs index 337d09c..e7a4a31 100644 --- a/src/InterfaceForward.Application/Services/Interface/ServiceProviderInterfaceService.cs +++ b/src/InterfaceForward.Application/Services/Interface/ServiceProviderInterfaceService.cs @@ -41,7 +41,7 @@ public class ServiceProviderInterfaceService : BaseService /// /// [HttpPost("Interface/ServiceProviderInterfacePaginatedList")] - public async Task> + public async Task> ServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input) { return await InterfaceRepository.GetServiceProviderInterfacePaginatedListAsync(input); diff --git a/src/InterfaceForward.Application/Services/Interface/SystemInterfaceService.cs b/src/InterfaceForward.Application/Services/Interface/SystemInterfaceService.cs index 8b7aecc..d06a7c5 100644 --- a/src/InterfaceForward.Application/Services/Interface/SystemInterfaceService.cs +++ b/src/InterfaceForward.Application/Services/Interface/SystemInterfaceService.cs @@ -49,7 +49,7 @@ public class SystemInterfaceService : BaseService /// /// [HttpPost("Interface/SystemInterfacePaginatedList")] - public async Task> + public async Task> SystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input) { return await _interfaceRepository.GetSystemInterfacePaginatedListAsync(input); diff --git a/src/InterfaceForward.Application/Services/InterfaceMap/InterfaceMapService.cs b/src/InterfaceForward.Application/Services/InterfaceMap/InterfaceMapService.cs index c9a6c49..e8f237b 100644 --- a/src/InterfaceForward.Application/Services/InterfaceMap/InterfaceMapService.cs +++ b/src/InterfaceForward.Application/Services/InterfaceMap/InterfaceMapService.cs @@ -96,7 +96,7 @@ public partial class InterfaceMapService : ApplicationService /// /// [HttpGet("InterfaceMap/GetMapList")] - public async Task> GetMapListByIdAsync(GetMapListInputVO inputVo) + public async Task> GetMapListByIdAsync(GetMapListInputVO inputVo) { return await _interfaceMapRepository.GetMapListAsync(inputVo); } diff --git a/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderAccountService.cs b/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderAccountService.cs index f2943f9..b728a5c 100644 --- a/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderAccountService.cs +++ b/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderAccountService.cs @@ -191,12 +191,12 @@ public class ServiceProviderAccountService : BaseService /// 页大小 /// [HttpGet("ServiceProviderAccount/GetAccountPageList")] - public async Task>> GetAccountPageListAsync( + public async Task>> GetAccountPageListAsync( [Required] int serviceProviderId , int pageIndex = 1 , int pageSize = 50) { - var res = new PagedListDto>(); + var res = new PagedResult>(); // 获取账户列表分页数据 var data = await _serviceProviderAccountRepository.GetAccountPageListAsync(serviceProviderId, pageIndex, diff --git a/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderService.cs b/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderService.cs index 3ffe2a9..3382886 100644 --- a/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderService.cs +++ b/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderService.cs @@ -37,7 +37,7 @@ public class ServiceProviderService : BaseService /// 入参 /// [HttpPost("ServiceProvider/PaginatedList")] - public async Task> GetPaginatedListAsync( + public async Task> GetPaginatedListAsync( ServiceProviderPaginatedInputObjectValue input) { return await _serviceProviderRepository.GetPaginatedListAsync(input); diff --git a/src/InterfaceForward.Domain.Shared/Helpers/JsonHelper.cs b/src/InterfaceForward.Domain.Shared/Helpers/JsonHelper.cs index 7314ef0..6f79903 100644 --- a/src/InterfaceForward.Domain.Shared/Helpers/JsonHelper.cs +++ b/src/InterfaceForward.Domain.Shared/Helpers/JsonHelper.cs @@ -1,4 +1,5 @@ using Fake; +using Fake.Application; using InterfaceForward.Domain.Shared.Dtos; using InterfaceForward.Domain.Shared.Enum; using Newtonsoft.Json.Linq; diff --git a/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj b/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj index c63d79b..eb79b9a 100644 --- a/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj +++ b/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + net8.0 @@ -11,6 +11,6 @@ - + diff --git a/src/InterfaceForward.Repositories/App/Entitys/AppEntity.cs b/src/InterfaceForward.Repositories/App/Entitys/AppEntity.cs index 938c873..af13f35 100644 --- a/src/InterfaceForward.Repositories/App/Entitys/AppEntity.cs +++ b/src/InterfaceForward.Repositories/App/Entitys/AppEntity.cs @@ -4,7 +4,7 @@ /// 应用表 /// [SugarTable("t_app")] -public class AppEntity : FullAuditedAggregate +public class AppEntity : FullAuditedAggregateRoot { /// /// 自增主键 diff --git a/src/InterfaceForward.Repositories/App/Entitys/AppScopeEntity.cs b/src/InterfaceForward.Repositories/App/Entitys/AppScopeEntity.cs index 6f0dbbc..fb9a89c 100644 --- a/src/InterfaceForward.Repositories/App/Entitys/AppScopeEntity.cs +++ b/src/InterfaceForward.Repositories/App/Entitys/AppScopeEntity.cs @@ -4,7 +4,7 @@ /// 应用可用接口表 /// [SugarTable("t_app_scope")] - public class AppScopeEntity : FullAuditedAggregate + public class AppScopeEntity : FullAuditedAggregateRoot { /// /// 自增主键 diff --git a/src/InterfaceForward.Repositories/BasicRepository.cs b/src/InterfaceForward.Repositories/BasicRepository.cs index 01ce14c..26a1c92 100644 --- a/src/InterfaceForward.Repositories/BasicRepository.cs +++ b/src/InterfaceForward.Repositories/BasicRepository.cs @@ -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; diff --git a/src/InterfaceForward.Repositories/Dictionary/Entitys/DictionaryEntity.cs b/src/InterfaceForward.Repositories/Dictionary/Entitys/DictionaryEntity.cs index eb6959b..08b704a 100644 --- a/src/InterfaceForward.Repositories/Dictionary/Entitys/DictionaryEntity.cs +++ b/src/InterfaceForward.Repositories/Dictionary/Entitys/DictionaryEntity.cs @@ -4,7 +4,7 @@ /// 字典表 /// [SugarTable("t_dictionary")] - public class DictionaryEntity : FullAuditedAggregate + public class DictionaryEntity : FullAuditedAggregateRoot { /// diff --git a/src/InterfaceForward.Repositories/GlobalUsings.cs b/src/InterfaceForward.Repositories/GlobalUsings.cs index 753ed69..3216b85 100644 --- a/src/InterfaceForward.Repositories/GlobalUsings.cs +++ b/src/InterfaceForward.Repositories/GlobalUsings.cs @@ -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; \ No newline at end of file diff --git a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceEntity.cs b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceEntity.cs index 83994be..d47a89c 100644 --- a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceEntity.cs +++ b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceEntity.cs @@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.Interface.Entitys; /// 接口表 /// [SugarTable("t_interface")] -public class InterfaceEntity : FullAuditedAggregate +public class InterfaceEntity : FullAuditedAggregateRoot { /// diff --git a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapDetailEntity.cs b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapDetailEntity.cs index 622fa06..bd82a2e 100644 --- a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapDetailEntity.cs +++ b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapDetailEntity.cs @@ -4,7 +4,7 @@ /// 接口映射明细表 /// [SugarTable("t_interface_map_detail")] -public class InterfaceMapDetailEntity: FullAuditedAggregate +public class InterfaceMapDetailEntity: FullAuditedAggregateRoot { /// /// 映射明细id diff --git a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapEntity.cs b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapEntity.cs index 8fd20fe..5e57888 100644 --- a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapEntity.cs +++ b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapEntity.cs @@ -4,7 +4,7 @@ /// 接口映射表 /// [SugarTable("t_interface_map")] - public class InterfaceMapEntity : FullAuditedAggregate + public class InterfaceMapEntity : FullAuditedAggregateRoot { /// diff --git a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapPublishedEntity.cs b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapPublishedEntity.cs index 21e266e..f560915 100644 --- a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapPublishedEntity.cs +++ b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceMapPublishedEntity.cs @@ -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,IAggregateRoo /// 创建时间 [SugarColumn(ColumnName = "CreateTime")] public virtual DateTime? CreateTime { get; set; } + + public Guid ConcurrencyStamp { get; set; } } \ No newline at end of file diff --git a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceReturnConfigEntity.cs b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceReturnConfigEntity.cs index f6670c1..5cfd174 100644 --- a/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceReturnConfigEntity.cs +++ b/src/InterfaceForward.Repositories/Interface/Entitys/InterfaceReturnConfigEntity.cs @@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.Interface.Entitys; /// 接口返回配置 /// [SugarTable("t_interface_return_config")] -public class InterfaceReturnConfigEntity : FullAuditedAggregate +public class InterfaceReturnConfigEntity : FullAuditedAggregateRoot { /// /// 自增主键 diff --git a/src/InterfaceForward.Repositories/Interface/Services/IInterfaceMapRepository.cs b/src/InterfaceForward.Repositories/Interface/Services/IInterfaceMapRepository.cs index 57d8b50..1ec8155 100644 --- a/src/InterfaceForward.Repositories/Interface/Services/IInterfaceMapRepository.cs +++ b/src/InterfaceForward.Repositories/Interface/Services/IInterfaceMapRepository.cs @@ -13,7 +13,7 @@ namespace InterfaceForward.Repositories.Interface.Services /// /// /// - Task> GetMapListAsync(GetMapListInputVO inputVo); + Task> GetMapListAsync(GetMapListInputVO inputVo); /// /// 获取参数映射列表 diff --git a/src/InterfaceForward.Repositories/Interface/Services/IInterfaceRepository.cs b/src/InterfaceForward.Repositories/Interface/Services/IInterfaceRepository.cs index f444d51..cf249b1 100644 --- a/src/InterfaceForward.Repositories/Interface/Services/IInterfaceRepository.cs +++ b/src/InterfaceForward.Repositories/Interface/Services/IInterfaceRepository.cs @@ -17,14 +17,14 @@ namespace InterfaceForward.Repositories.Interface.Services /// /// /// - Task> GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input); + Task> GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input); /// /// 获取服务商接口分页 /// /// /// - Task> GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input); + Task> GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input); /// /// 获取参数列表 diff --git a/src/InterfaceForward.Repositories/Interface/Services/InterfaceMapRepository.cs b/src/InterfaceForward.Repositories/Interface/Services/InterfaceMapRepository.cs index e10d580..a54ac04 100644 --- a/src/InterfaceForward.Repositories/Interface/Services/InterfaceMapRepository.cs +++ b/src/InterfaceForward.Repositories/Interface/Services/InterfaceMapRepository.cs @@ -15,7 +15,7 @@ public class InterfaceMapRepository : BasicRepository, IScop /// /// /// - public async Task> GetMapListAsync(GetMapListInputVO inputVo) + public async Task> GetMapListAsync(GetMapListInputVO inputVo) { // 上下游一对多关系 var query = Context.Queryable() diff --git a/src/InterfaceForward.Repositories/Interface/Services/InterfaceRepository.cs b/src/InterfaceForward.Repositories/Interface/Services/InterfaceRepository.cs index 24d98db..4e8463a 100644 --- a/src/InterfaceForward.Repositories/Interface/Services/InterfaceRepository.cs +++ b/src/InterfaceForward.Repositories/Interface/Services/InterfaceRepository.cs @@ -16,7 +16,7 @@ public class InterfaceRepository : BasicRepository, IInterfaceR public string InterfaceGroup => "InterfaceGroup"; /// - public async Task> + public async Task> GetSystemInterfacePaginatedListAsync(SystemInterfacePaginatedInputObjectValue input) { // t_interface驱动t_interface_map,数据量上来可以在t_interface_map UpStreamId字段建立索引 @@ -47,7 +47,7 @@ public class InterfaceRepository : BasicRepository, IInterfaceR } /// - public async Task> + public async Task> GetServiceProviderInterfacePaginatedListAsync(ServiceProviderInterfacePaginatedInputObjectValue input) { var query = AsQueryable() diff --git a/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj b/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj index 48c57d8..9494678 100644 --- a/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj +++ b/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/InterfaceForward.Repositories/InterfaceForwardQuery.cs b/src/InterfaceForward.Repositories/InterfaceForwardQuery.cs index c9069c5..1d1db47 100644 --- a/src/InterfaceForward.Repositories/InterfaceForwardQuery.cs +++ b/src/InterfaceForward.Repositories/InterfaceForwardQuery.cs @@ -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; diff --git a/src/InterfaceForward.Repositories/Parameter/Entities/FixedParameterEntity.cs b/src/InterfaceForward.Repositories/Parameter/Entities/FixedParameterEntity.cs index 57e2391..abf2a7f 100644 --- a/src/InterfaceForward.Repositories/Parameter/Entities/FixedParameterEntity.cs +++ b/src/InterfaceForward.Repositories/Parameter/Entities/FixedParameterEntity.cs @@ -4,7 +4,7 @@ /// 固定参数 /// [SugarTable("t_parameter_fixed")] -public class FixedParameterEntity : FullAuditedAggregate +public class FixedParameterEntity : FullAuditedAggregateRoot { /// diff --git a/src/InterfaceForward.Repositories/Parameter/Entities/FormParameterEntity.cs b/src/InterfaceForward.Repositories/Parameter/Entities/FormParameterEntity.cs index 0ea3b5c..a7826b1 100644 --- a/src/InterfaceForward.Repositories/Parameter/Entities/FormParameterEntity.cs +++ b/src/InterfaceForward.Repositories/Parameter/Entities/FormParameterEntity.cs @@ -4,7 +4,7 @@ /// 表单参数 /// [SugarTable("t_parameter_form")] -public class FormParameterEntity : FullAuditedAggregate +public class FormParameterEntity : FullAuditedAggregateRoot { /// /// 自增主键 diff --git a/src/InterfaceForward.Repositories/Parameter/Entities/ParameterEntity.cs b/src/InterfaceForward.Repositories/Parameter/Entities/ParameterEntity.cs index fe1cc31..b325795 100644 --- a/src/InterfaceForward.Repositories/Parameter/Entities/ParameterEntity.cs +++ b/src/InterfaceForward.Repositories/Parameter/Entities/ParameterEntity.cs @@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.Interface.Entitys /// 参数表 /// [SugarTable("t_parameter")] - public class ParameterEntity : FullAuditedAggregate + public class ParameterEntity : FullAuditedAggregateRoot { /// diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountEntity.cs b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountEntity.cs index e17ea78..5d1c1e6 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountEntity.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountEntity.cs @@ -4,7 +4,7 @@ /// 服务商账户表 /// [SugarTable("t_service_provider_account")] - public class ServiceProviderAccountEntity : FullAuditedAggregate + public class ServiceProviderAccountEntity : FullAuditedAggregateRoot { /// /// 自增主键 diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountFieldEntity.cs b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountFieldEntity.cs index e64cbcf..2d36032 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountFieldEntity.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountFieldEntity.cs @@ -2,7 +2,7 @@ /// 服务商账户字段表 /// [SugarTable("t_service_provider_account_field")] -public class ServiceProviderAccountFieldEntity : FullAuditedAggregate +public class ServiceProviderAccountFieldEntity : FullAuditedAggregateRoot { /// diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountFieldValueEntity.cs b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountFieldValueEntity.cs index 4c17255..a17f7e8 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountFieldValueEntity.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAccountFieldValueEntity.cs @@ -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; /// 服务商账户授权表 /// [SugarTable("t_service_provider_account_field_value")] -public class ServiceProviderAccountFieldValueEntity: Entity, IAggregateRoot +public class ServiceProviderAccountFieldValueEntity: AggregateRoot { /// /// 自增主键 diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAuthConfigEntity.cs b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAuthConfigEntity.cs index fb84922..e61d692 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAuthConfigEntity.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderAuthConfigEntity.cs @@ -6,7 +6,7 @@ namespace InterfaceForward.Repositories.ServiceProvider.Entitys; /// 服务商授权配置表 /// [SugarTable("t_service_provider_auth_config")] -public class ServiceProviderAuthConfigEntity: FullAuditedAggregate +public class ServiceProviderAuthConfigEntity: FullAuditedAggregateRoot { /// /// 自增主键 diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderEntity.cs b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderEntity.cs index 0952e4b..ea24751 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderEntity.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Entitys/ServiceProviderEntity.cs @@ -4,7 +4,7 @@ /// 服务商主表 /// [SugarTable("t_service_provider")] -public class ServiceProviderEntity : FullAuditedAggregate +public class ServiceProviderEntity : FullAuditedAggregateRoot { /// diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderAccountRepository.cs b/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderAccountRepository.cs index 1b5e335..81d55ff 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderAccountRepository.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderAccountRepository.cs @@ -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 /// /// - Task> GetAccountPageListAsync(int serviceProviderId, + Task> GetAccountPageListAsync(int serviceProviderId, int pageIndex, int pageSize); diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderRepository.cs b/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderRepository.cs index ea54cb8..072b2aa 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderRepository.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderRepository.cs @@ -14,7 +14,7 @@ namespace InterfaceForward.Repositories.ServiceProvider.Services /// /// /// - Task> GetPaginatedListAsync( + Task> GetPaginatedListAsync( ServiceProviderPaginatedInputObjectValue input); /// diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderAccountRepository.cs b/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderAccountRepository.cs index 5755eb5..7834c9d 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderAccountRepository.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderAccountRepository.cs @@ -20,7 +20,7 @@ public class ServiceProviderAccountRepository : BasicRepository> GetAccountPageListAsync( + public async Task> GetAccountPageListAsync( int serviceProviderId, int pageIndex, int pageSize) { return await Context.Queryable() diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderRepository.cs b/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderRepository.cs index d13cbd9..76e502f 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderRepository.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderRepository.cs @@ -13,7 +13,7 @@ public class ServiceProviderRepository : BasicRepository, IServiceProviderRepository { /// - public async Task> GetPaginatedListAsync( + public async Task> GetPaginatedListAsync( ServiceProviderPaginatedInputObjectValue input) { // t_service_provider驱动t_interface,数据量上来可以在t_interface ServiceProviderId字段建立索引 diff --git a/src/InterfaceForward.Repositories/SugarQueryableExtensions.cs b/src/InterfaceForward.Repositories/SugarQueryableExtensions.cs index 68e7bd7..d026447 100644 --- a/src/InterfaceForward.Repositories/SugarQueryableExtensions.cs +++ b/src/InterfaceForward.Repositories/SugarQueryableExtensions.cs @@ -3,12 +3,12 @@ namespace InterfaceForward.Repositories; public static class SugarQueryableExtensions { - public static async Task> ToPagedListAsync(this ISugarQueryable query, + public static async Task> ToPagedListAsync(this ISugarQueryable query, int pageIndex, int pageSize) where TEntity : class { RefAsync totalCount = 0; var items = await query.ToPageListAsync(pageIndex, pageSize, totalCount); - return new PagedListDto(items, totalCount); + return new PagedResult(totalCount, items); } } \ No newline at end of file