From e0f2b29f3349d43e7f4222e079c54ba9cc4b6ee1 Mon Sep 17 00:00:00 2001 From: sunpengfei <i@angelzzz.com> Date: 星期一, 16 六月 2025 11:09:23 +0800 Subject: [PATCH] fix:支付回调及供应商回调并发问题修订 --- LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs b/LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs index 332f441..e35f536 100644 --- a/LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs +++ b/LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs @@ -119,7 +119,7 @@ }); Configure<AbpAuditingOptions>(options => { - options.IsEnabledForGetRequests = false; + options.IsEnabledForGetRequests = true; options.ApplicationName = "LifePaymentService"; }); Configure<AbpUnitOfWorkOptions>(options => @@ -149,8 +149,11 @@ cacheOptions.KeyPrefix = "LifePaymentServices_"; cacheOptions.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromMinutes(20); }); + this.Configure<OssSettings>(configuration.GetSection("ossSettings")); this.Configure<ACOOLYOption>(configuration.GetSection("ACOOLY")); + this.Configure<Config>("AliPayEcsign", configuration.GetSection("AliPayEcsign")); this.Configure<InformationOption>(configuration.GetSection("WeiXinCgi")); + this.Configure<InitSetting>(configuration.GetSection("InitSetting")); } public override void OnApplicationInitialization(ApplicationInitializationContext context) @@ -167,13 +170,18 @@ app.UseIdentityServer(); app.UseAuthorization(); app.UseAbpClaimsMap(); -#if DEBUG - app.UseSwagger(); - app.UseSwaggerUI(options => + + var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>(); + var openSwagger = configuration["OpenSwagger"].ToBoolOrNull(); + if (openSwagger == true) { - options.SwaggerEndpoint("/swagger/v1/swagger.json", "LifePayment Service API"); - }); -#endif + app.UseSwagger(); + app.UseSwaggerUI(options => + { + options.SwaggerEndpoint("/swagger/v1/swagger.json", "LifePayment Service API"); + }); + } + app.UseAuditing(); app.UseConfiguredEndpoints(); AsyncHelper.RunSync(async () => -- Gitblit v1.9.1