diff --git a/src/InterfaceForward.Api/InterfaceForward.Api.csproj b/src/InterfaceForward.Api/InterfaceForward.Api.csproj index 3e0b2ad..3c91eff 100644 --- a/src/InterfaceForward.Api/InterfaceForward.Api.csproj +++ b/src/InterfaceForward.Api/InterfaceForward.Api.csproj @@ -16,12 +16,12 @@ - - + + - + - + diff --git a/src/InterfaceForward.Api/InterfaceForwardApiModule.cs b/src/InterfaceForward.Api/InterfaceForwardApiModule.cs index c9fa24b..4d5b5b9 100644 --- a/src/InterfaceForward.Api/InterfaceForwardApiModule.cs +++ b/src/InterfaceForward.Api/InterfaceForwardApiModule.cs @@ -29,7 +29,8 @@ public class InterfaceForwardApiModule : FakeModule services.AddFakeSwaggerGen() .AddFakeExceptionFilter() .AddFakeValidationActionFilter() - .AddFakeAspNetCoreAuditing(); + .AddFakeAspNetCoreAuditing() + .AddFakeUnitOfWorkActionFilter(); services.AddCors(options => { diff --git a/src/InterfaceForward.Api/appsettings.json b/src/InterfaceForward.Api/appsettings.json index 8ad5b8d..5bdec34 100644 --- a/src/InterfaceForward.Api/appsettings.json +++ b/src/InterfaceForward.Api/appsettings.json @@ -45,9 +45,9 @@ "RabbitMQ": { "Connections": { "Default": { - "Host": "129.204.22.146", + "HostName": "129.204.22.146", "Port": 5672, - "UserName": "dev", + "UserName": "rabbit", "Password": "itd!@#123" } } diff --git a/src/InterfaceForward.AppHost/InterfaceForward.AppHost.csproj b/src/InterfaceForward.AppHost/InterfaceForward.AppHost.csproj index cb8a3c7..9f03477 100644 --- a/src/InterfaceForward.AppHost/InterfaceForward.AppHost.csproj +++ b/src/InterfaceForward.AppHost/InterfaceForward.AppHost.csproj @@ -11,7 +11,6 @@ - diff --git a/src/InterfaceForward.Application.Contracts/InterfaceForward.Application.Contracts.csproj b/src/InterfaceForward.Application.Contracts/InterfaceForward.Application.Contracts.csproj index b134939..11d50cf 100644 --- a/src/InterfaceForward.Application.Contracts/InterfaceForward.Application.Contracts.csproj +++ b/src/InterfaceForward.Application.Contracts/InterfaceForward.Application.Contracts.csproj @@ -11,6 +11,6 @@ - + diff --git a/src/InterfaceForward.Application/InterfaceForward.Application.csproj b/src/InterfaceForward.Application/InterfaceForward.Application.csproj index efd110c..ff39380 100644 --- a/src/InterfaceForward.Application/InterfaceForward.Application.csproj +++ b/src/InterfaceForward.Application/InterfaceForward.Application.csproj @@ -15,13 +15,13 @@ - + - - - - - + + + + + diff --git a/src/InterfaceForward.Application/Services/Parameter/FixedParameterService.cs b/src/InterfaceForward.Application/Services/Parameter/FixedParameterService.cs index 6dd062b..bec5863 100644 --- a/src/InterfaceForward.Application/Services/Parameter/FixedParameterService.cs +++ b/src/InterfaceForward.Application/Services/Parameter/FixedParameterService.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations; +using Fake.UnitOfWork; using InterfaceForward.Application.Contracts.Dtos.ServiceProvider; using InterfaceForward.Application.Helpers; using InterfaceForward.Domain.Shared; @@ -43,7 +44,6 @@ public class FixedParameterService : ApplicationService : await _fixedParameterRepository.GetListAsync(x => x.ServiceProviderId == serviceProviderId || x.InterfaceId == interfaceId); var res = ObjectMapper.Map, List>(list); - for (var i = 0; i < res.Count; i++) { var item = res[i]; diff --git a/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj b/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj index 57b321e..0276abb 100644 --- a/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj +++ b/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj @@ -6,11 +6,11 @@ - + - + diff --git a/src/InterfaceForward.Repositories/BasicRepository.cs b/src/InterfaceForward.Repositories/BasicRepository.cs index 26a1c92..a117f95 100644 --- a/src/InterfaceForward.Repositories/BasicRepository.cs +++ b/src/InterfaceForward.Repositories/BasicRepository.cs @@ -8,7 +8,7 @@ namespace InterfaceForward.Repositories; /// 仓储基类实现 /// /// -public class BasicRepository : SqlSugarRepository, IBasicRepository where T : class, IAggregateRoot, new() +public class BasicRepository : SqlSugarRepository, IBasicRepositorywhere T : class, IAggregateRoot, new() { protected ISqlSugarClient Context => GetDbContextAsync().Result.SqlSugarClient; diff --git a/src/InterfaceForward.Repositories/IBasicRepository.cs b/src/InterfaceForward.Repositories/IBasicRepository.cs index 7eecccc..b8d8e6d 100644 --- a/src/InterfaceForward.Repositories/IBasicRepository.cs +++ b/src/InterfaceForward.Repositories/IBasicRepository.cs @@ -1,7 +1,10 @@ using System.Linq.Expressions; +using Fake.Domain.Entities; +using Fake.DomainDrivenDesign.Repositories.SqlSugarCore; + namespace InterfaceForward.Repositories; -public interface IBasicRepository +public interface IBasicRepository: ISqlSugarRepository where T : class, IAggregateRoot, new() { public ISugarQueryable AsQueryable(); diff --git a/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj b/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj index 6204b73..b45d016 100644 --- a/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj +++ b/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/src/InterfaceForward.Repositories/InterfaceForwardDbContext.cs b/src/InterfaceForward.Repositories/InterfaceForwardDbContext.cs index bf0d3c5..a329014 100644 --- a/src/InterfaceForward.Repositories/InterfaceForwardDbContext.cs +++ b/src/InterfaceForward.Repositories/InterfaceForwardDbContext.cs @@ -1,4 +1,6 @@ -using Fake.SqlSugarCore; +using System.Reflection; +using Fake.Domain.Entities; +using Fake.SqlSugarCore; namespace InterfaceForward.Repositories; @@ -7,4 +9,19 @@ public class InterfaceForwardDbContext:SugarDbContext public InterfaceForwardDbContext(SugarDbConnOptions options) : base(options) { } + + protected override void ConfigureEntityService(PropertyInfo property, EntityColumnInfo column) + { + if (property.Name == nameof(IAggregateRoot.ConcurrencyStamp)) + { + column.IsIgnore = true; + } + + if (property.Name == nameof(IEntity.IsTransient)) + { + column.IsIgnore = true; + } + + base.ConfigureEntityService(property, column); + } } \ No newline at end of file