From fa48f8996e9e829bc9352863596011d1e0e95490 Mon Sep 17 00:00:00 2001 From: sunpengfei <i@angelzzz.com> Date: 星期二, 10 六月 2025 16:32:25 +0800 Subject: [PATCH] fix:运营端——渠道管理——渠道管理(渠道折扣接口请求进行编辑可低于供应商折扣) --- LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs b/LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs index ce20062..e35f536 100644 --- a/LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs +++ b/LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs @@ -153,6 +153,7 @@ 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) @@ -169,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