From 21fdb41b094e2f79942de70f07954684a2b94c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= <454313500@qq.com> Date: Fri, 8 Mar 2024 13:43:17 +0800 Subject: [PATCH] =?UTF-8?q?stlye:=20=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E9=85=8D=E7=BD=AE=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YiFrameworkSqlSugarCoreModule.cs | 18 +++++++++++++++++- .../src/views/monitor/operlog/index.vue | 4 ++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/YiFrameworkSqlSugarCoreModule.cs b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/YiFrameworkSqlSugarCoreModule.cs index c54e512e..9718f18b 100644 --- a/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/YiFrameworkSqlSugarCoreModule.cs +++ b/Yi.Abp.Net8/framework/Yi.Framework.SqlSugarCore/YiFrameworkSqlSugarCoreModule.cs @@ -1,6 +1,9 @@ using System.Reflection; +using System.Text; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using SqlSugar; using Volo.Abp; @@ -24,7 +27,6 @@ namespace Yi.Framework.SqlSugarCore var configuration = service.GetConfiguration(); Configure(configuration.GetSection("DbConnOptions")); - service.TryAddScoped(); //不开放sqlsugarClient @@ -48,8 +50,22 @@ namespace Yi.Framework.SqlSugarCore //进行CodeFirst var service = context.ServiceProvider; var options = service.GetRequiredService>().Value; + + var _logger= service.GetRequiredService>(); + StringBuilder sb = new StringBuilder(); + sb.AppendLine(); + sb.AppendLine("==========Yi-SQL配置:=========="); + sb.AppendLine($"数据库连接字符串:{options.Url}"); + sb.AppendLine($"数据库类型:{options.DbType.ToString()}"); + sb.AppendLine($"是否开启种子数据:{options.EnabledDbSeed}"); + sb.AppendLine($"是否开启CodeFirst:{options.EnabledCodeFirst}"); + sb.AppendLine($"是否开启Saas多租户:{options.EnabledSaasMultiTenancy}"); + sb.AppendLine("==============================="); + + + _logger.LogInformation(sb.ToString()); //Todo:准备支持多租户种子数据及CodeFirst if (options.EnabledCodeFirst) diff --git a/Yi.RuoYi.Vue3/src/views/monitor/operlog/index.vue b/Yi.RuoYi.Vue3/src/views/monitor/operlog/index.vue index 774dfffd..6c1f9534 100644 --- a/Yi.RuoYi.Vue3/src/views/monitor/operlog/index.vue +++ b/Yi.RuoYi.Vue3/src/views/monitor/operlog/index.vue @@ -100,11 +100,11 @@ - +