diff --git a/src/InterfaceForward.Api/InterfaceForward.Api.csproj b/src/InterfaceForward.Api/InterfaceForward.Api.csproj index 86801b8..b3a6390 100644 --- a/src/InterfaceForward.Api/InterfaceForward.Api.csproj +++ b/src/InterfaceForward.Api/InterfaceForward.Api.csproj @@ -16,11 +16,11 @@ - + - + - + diff --git a/src/InterfaceForward.Api/InterfaceForwardApiModule.cs b/src/InterfaceForward.Api/InterfaceForwardApiModule.cs index 93b7252..dc1460f 100644 --- a/src/InterfaceForward.Api/InterfaceForwardApiModule.cs +++ b/src/InterfaceForward.Api/InterfaceForwardApiModule.cs @@ -54,6 +54,8 @@ public class InterfaceForwardApiModule : FakeModule { var app = context.GetWebApplication(); + app.MapControllers(); + // Add Aspire default endpoints. app.MapDefaultEndpoints(); diff --git a/src/InterfaceForward.Api/Properties/launchSettings.json b/src/InterfaceForward.Api/Properties/launchSettings.json index ba1b501..cb556c1 100644 --- a/src/InterfaceForward.Api/Properties/launchSettings.json +++ b/src/InterfaceForward.Api/Properties/launchSettings.json @@ -13,6 +13,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, + "launchUrl": "swagger/index.html", "applicationUrl": "http://localhost:5145", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" diff --git a/src/InterfaceForward.Application/GlobalUsings.cs b/src/InterfaceForward.Application/GlobalUsings.cs index 79e329f..b542bf7 100644 --- a/src/InterfaceForward.Application/GlobalUsings.cs +++ b/src/InterfaceForward.Application/GlobalUsings.cs @@ -1,5 +1,6 @@ // Global using directives global using Fake; +global using Fake.DomainDrivenDesign.Application; global using Fake.DomainDrivenDesign.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 7fde7c1..89d1b2b 100644 --- a/src/InterfaceForward.Application/InterfaceForward.Application.csproj +++ b/src/InterfaceForward.Application/InterfaceForward.Application.csproj @@ -20,7 +20,7 @@ - + diff --git a/src/InterfaceForward.Application/Services/App/AppsService.cs b/src/InterfaceForward.Application/Services/App/AppsService.cs index d79f9c3..5c8ad9e 100644 --- a/src/InterfaceForward.Application/Services/App/AppsService.cs +++ b/src/InterfaceForward.Application/Services/App/AppsService.cs @@ -305,8 +305,7 @@ public class AppsService : ApplicationService /// /// 生成单个随机数字 /// - [ApiExplorerSettings(IgnoreApi = true)] - public int CreateNum() + private int CreateNum() { Random random = new Random(); int num = random.Next(10); @@ -316,8 +315,7 @@ public class AppsService : ApplicationService /// /// 生成单个大写随机字母 /// - [ApiExplorerSettings(IgnoreApi = true)] - public string CreateBigAbc() + private string CreateBigAbc() { //A-Z的 ASCII值为65-90 Random random = new Random(); @@ -329,8 +327,7 @@ public class AppsService : ApplicationService /// /// 生成单个小写随机字母 /// - [ApiExplorerSettings(IgnoreApi = true)] - public string CreateSmallAbc() + private string CreateSmallAbc() { //a-z的 ASCII值为97-122 Random random = new Random(); diff --git a/src/InterfaceForward.Application/Services/ApplicationService.cs b/src/InterfaceForward.Application/Services/ApplicationService.cs deleted file mode 100644 index 322a4c2..0000000 --- a/src/InterfaceForward.Application/Services/ApplicationService.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Fake.DependencyInjection; -using Fake.ObjectMapping; -using Microsoft.Extensions.DependencyInjection; - -namespace InterfaceForward.Application.Services; - -public class ApplicationService:IRemoteService -{ - public ILazyServiceProvider LazyServiceProvider { get; set; } = default!; - - protected IObjectMapper ObjectMapper => LazyServiceProvider.GetService(provider => - provider.GetRequiredService())!; - -} \ No newline at end of file diff --git a/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderAccountService.cs b/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderAccountService.cs index 4e6aee7..a58232c 100644 --- a/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderAccountService.cs +++ b/src/InterfaceForward.Application/Services/ServiceProvider/ServiceProviderAccountService.cs @@ -2,7 +2,6 @@ using System.Diagnostics; using InterfaceForward.Application.Contracts.Dtos.ServiceProvider; using InterfaceForward.Application.Helpers; -using InterfaceForward.Domain.Shared.Dtos; using InterfaceForward.Domain.Shared.Enum; using InterfaceForward.Repositories.ServiceProvider.Entitys; using InterfaceForward.Repositories.ServiceProvider.Services; @@ -192,12 +191,12 @@ public class ServiceProviderAccountService : ApplicationService /// 页大小 /// [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 PagedListDto>(); // 获取账户列表分页数据 var data = await _serviceProviderAccountRepository.GetAccountPageListAsync(serviceProviderId, pageIndex, @@ -215,9 +214,9 @@ public class ServiceProviderAccountService : ApplicationService foreach (var item in data.Items) { // 一行数据 - var dic = new Dictionary(); + var dic = new Dictionary(); - object updateTime = null; + object? updateTime = null; // 固定部分 foreach (var propertyInfo in properties) diff --git a/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj b/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj index b886ec9..088b2d1 100644 --- a/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj +++ b/src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj @@ -5,12 +5,12 @@ - - + + - + diff --git a/src/InterfaceForward.Repositories/IBasicRepository.cs b/src/InterfaceForward.Repositories/IBasicRepository.cs index c92932e..83d4726 100644 --- a/src/InterfaceForward.Repositories/IBasicRepository.cs +++ b/src/InterfaceForward.Repositories/IBasicRepository.cs @@ -11,7 +11,7 @@ public interface IBasicRepository /// /// /// - Task GetFirstAsync(Expression> whereExpression); + Task GetFirstAsync(Expression> whereExpression); Task GetFirstAsync(Expression> whereExpression,Expression> resultExpression); diff --git a/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj b/src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj index e249332..0c6e84c 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/ServiceProvider/ValueObjects/ServiceProviderAccountFieldPageValueObject.cs b/src/InterfaceForward.Repositories/ServiceProvider/ValueObjects/ServiceProviderAccountFieldPageValueObject.cs index cc532c4..712ff83 100644 --- a/src/InterfaceForward.Repositories/ServiceProvider/ValueObjects/ServiceProviderAccountFieldPageValueObject.cs +++ b/src/InterfaceForward.Repositories/ServiceProvider/ValueObjects/ServiceProviderAccountFieldPageValueObject.cs @@ -15,5 +15,5 @@ public class ServiceProviderAccountFieldPageValueObject /// /// 字段值 /// - public string FieldValue { get; set; } + public string? FieldValue { get; set; } } \ No newline at end of file