diff --git a/src/InterfaceForward.Api/InterfaceForward.Api.csproj b/src/InterfaceForward.Api/InterfaceForward.Api.csproj index d43d7b5..a6395d1 100644 --- a/src/InterfaceForward.Api/InterfaceForward.Api.csproj +++ b/src/InterfaceForward.Api/InterfaceForward.Api.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/InterfaceForward.Api/appsettings.json b/src/InterfaceForward.Api/appsettings.json index 5bdec34..d24d7f6 100644 --- a/src/InterfaceForward.Api/appsettings.json +++ b/src/InterfaceForward.Api/appsettings.json @@ -48,7 +48,8 @@ "HostName": "129.204.22.146", "Port": 5672, "UserName": "rabbit", - "Password": "itd!@#123" + "Password": "itd!@#123", + "DispatchConsumersAsync": true } } }, diff --git a/src/InterfaceForward.Application.Contracts/Dtos/Interface/SaveParameterMapsInput.cs b/src/InterfaceForward.Application.Contracts/Dtos/Interface/SaveParameterMapsInput.cs index 9df9a97..499bef3 100644 --- a/src/InterfaceForward.Application.Contracts/Dtos/Interface/SaveParameterMapsInput.cs +++ b/src/InterfaceForward.Application.Contracts/Dtos/Interface/SaveParameterMapsInput.cs @@ -2,19 +2,15 @@ public class SaveParameterMapsInput { - public SaveParameterMapsInput() - { - InParaMapList = new(); - } /// /// 入参映射列表 /// - public List InParaMapList { get; set; } + public List InParaMapList { get; set; } = new(); /// /// 出参映射明细 /// - public List MapDetails { get; set; } + public List MapDetails { get; set; } = new(); } public class MapItem @@ -32,12 +28,12 @@ public class MapItem /// /// 前置脚本 /// - public string PrefixScript { get; set; } + public string? PrefixScript { get; set; } /// /// 后置脚本 /// - public string PostfixScript { get; set; } + public string? PostfixScript { get; set; } /// /// 自由映射(支持不对等映射) @@ -47,7 +43,7 @@ public class MapItem /// /// 入参映射明细 /// - public List MapDetails { get; set; } + public List MapDetails { get; set; } = new(); } public class InterfaceMapDetail @@ -60,17 +56,17 @@ public class InterfaceMapDetail /// /// 【固定参数专用】固定参数值 /// - public string FixedValue { get; set; } + public string? FixedValue { get; set; } /// /// 【固定参数专用】服务商参数别名 xxx.xxx /// - public string Alias { get; set; } + public string? Alias { get; set; } /// /// 【固定参数专用】服务商参数描述 /// - public string Description { get; set; } + public string? Description { get; set; } /// /// 是否必填 diff --git a/src/InterfaceForward.Application/InterfaceForward.Application.csproj b/src/InterfaceForward.Application/InterfaceForward.Application.csproj index 3c3d3a4..5993c35 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/Services/InterfaceMap/InterfaceMapPublishService.cs b/src/InterfaceForward.Application/Services/InterfaceMap/InterfaceMapPublishService.cs index ef7fba5..f52dd85 100644 --- a/src/InterfaceForward.Application/Services/InterfaceMap/InterfaceMapPublishService.cs +++ b/src/InterfaceForward.Application/Services/InterfaceMap/InterfaceMapPublishService.cs @@ -57,7 +57,7 @@ public class InterfaceMapPublishService( /// [HttpGet("InterfaceMap/GetPublishCompare")] public async Task GetPublishCompareAsync([Required] string interfaceCode, - [Required] int serviceProviderId, string version) + [Required] int serviceProviderId, string? version) { var systemInterface = await interfaceForwardQuery.GetInterfaceByCodesAsync(interfaceCode); if (systemInterface == null) throw new BusinessException(message: "系统接口不存在"); diff --git a/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderService.cs b/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderService.cs index 1b6b524..77b0b3f 100644 --- a/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderService.cs +++ b/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderService.cs @@ -51,7 +51,7 @@ public class ServiceProviderService : ApplicationService /// [HttpGet("ServiceProvider/GetServiceProviderInterfaceCascadedList")] public async Task> - GetServiceProviderInterfaceCascadedListAsync([Required] int interfaceId, string serviceProviderName) + GetServiceProviderInterfaceCascadedListAsync([Required] int interfaceId, string? serviceProviderName) { return await _serviceProviderRepository.GetServiceProviderInterfaceCascadedListAsync(interfaceId, serviceProviderName); diff --git a/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj b/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj index e72bee4..abd370a 100644 --- a/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj +++ b/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj @@ -11,6 +11,6 @@ - + diff --git a/src/InterfaceForward.Domain.Shared/InterfaceForwardDomainSharedModule.cs b/src/InterfaceForward.Domain.Shared/InterfaceForwardDomainSharedModule.cs index f4e18c5..17a6217 100644 --- a/src/InterfaceForward.Domain.Shared/InterfaceForwardDomainSharedModule.cs +++ b/src/InterfaceForward.Domain.Shared/InterfaceForwardDomainSharedModule.cs @@ -1,4 +1,5 @@ -using Fake.Modularity; +using Fake.DomainDrivenDesign; +using Fake.Modularity; using InterfaceForward.Domain.Shared.Helpers; using InterfaceForward.Domain.Shared.Options; using Microsoft.Extensions.Configuration; @@ -6,6 +7,7 @@ using Microsoft.Extensions.DependencyInjection; namespace InterfaceForward.Domain.Shared { + [DependsOn(typeof(FakeDomainDrivenDesignModule))] public class InterfaceForwardDomainSharedModule : FakeModule { public override void ConfigureServices(ServiceConfigurationContext context) diff --git a/src/InterfaceForward.Repositories/Interface/ValueObjects/GetMapListInputVO.cs b/src/InterfaceForward.Repositories/Interface/ValueObjects/GetMapListInputVO.cs index 203a38f..7e5719c 100644 --- a/src/InterfaceForward.Repositories/Interface/ValueObjects/GetMapListInputVO.cs +++ b/src/InterfaceForward.Repositories/Interface/ValueObjects/GetMapListInputVO.cs @@ -8,5 +8,5 @@ public class GetMapListInputVO : PagedQueryInput [Required] public int InterfaceId { get; set; } - public string NameOrCode { get; set; } + public string? NameOrCode { get; set; } } \ No newline at end of file diff --git a/src/InterfaceForward.Repositories/Interface/ValueObjects/SystemInterfacePaginatedInputObjectValue.cs b/src/InterfaceForward.Repositories/Interface/ValueObjects/SystemInterfacePaginatedInputObjectValue.cs index dc1e393..ec47100 100644 --- a/src/InterfaceForward.Repositories/Interface/ValueObjects/SystemInterfacePaginatedInputObjectValue.cs +++ b/src/InterfaceForward.Repositories/Interface/ValueObjects/SystemInterfacePaginatedInputObjectValue.cs @@ -15,6 +15,6 @@ namespace InterfaceForward.Repositories.Interface.ValueObjects /// /// 接口名 /// - public string NameOrCode { get; set; } + public string? NameOrCode { get; set; } } } \ No newline at end of file diff --git a/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj b/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj index 21e45de..26f2923 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/InterfaceForwardDbContext.cs b/src/InterfaceForward.Repositories/InterfaceForwardDbContext.cs index a329014..74dfc66 100644 --- a/src/InterfaceForward.Repositories/InterfaceForwardDbContext.cs +++ b/src/InterfaceForward.Repositories/InterfaceForwardDbContext.cs @@ -24,4 +24,11 @@ public class InterfaceForwardDbContext:SugarDbContext base.ConfigureEntityService(property, column); } + + protected override void ConfigureGlobalFilters() + { + //需自定义扩展 + SqlSugarClient.QueryFilter.AddTableFilter(u => + DataFilter.IsEnabled() == false || !u.IsDeleted); + } } \ No newline at end of file diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderRepository.cs b/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderRepository.cs index 072b2aa..9b21902 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderRepository.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Services/IServiceProviderRepository.cs @@ -22,7 +22,7 @@ namespace InterfaceForward.Repositories.ServiceProvider.Services /// /// Task> GetServiceProviderInterfaceCascadedListAsync( - int interfaceId, string serviceProviderName); + int interfaceId, string? serviceProviderName); /// /// 更新服务商 diff --git a/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderRepository.cs b/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderRepository.cs index 76e502f..cc7a58d 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderRepository.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/Services/ServiceProviderRepository.cs @@ -46,7 +46,7 @@ public class ServiceProviderRepository : BasicRepository, /// public async Task> - GetServiceProviderInterfaceCascadedListAsync(int interfaceId, string serviceProviderName) + GetServiceProviderInterfaceCascadedListAsync(int interfaceId, string? serviceProviderName) { var mappedIds = await Context.Queryable() .LeftJoin((x, y) => x.DownStreamId == y.Id)