From d6f0e111f50f78057ff386f7c6fef7e463d12ba5 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期五, 20 九月 2024 15:32:22 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- Service/HStation.Service.Assets.Core/00-core/ConfigHelper.cs | 34 ++++++++++++++++------------------ 1 files changed, 16 insertions(+), 18 deletions(-) diff --git a/Service/HStation.Service.Assets.Core/00-core/ConfigHelper.cs b/Service/HStation.Service.Assets.Core/00-core/ConfigHelper.cs index ae768c3..9f4fa11 100644 --- a/Service/HStation.Service.Assets.Core/00-core/ConfigHelper.cs +++ b/Service/HStation.Service.Assets.Core/00-core/ConfigHelper.cs @@ -1,4 +1,4 @@ -锘縩amespace HStation.Xhs +锘縩amespace HStation.Assets { internal class ConfigHelper { @@ -9,26 +9,24 @@ { get { - //SnowFlakeSingle.WorkId = Settings.SqlSugar.SnowFlakeWorkId; 涓嶅悓鏈哄櫒閰嶇疆鐨勫敮涓�鏁板瓧; // 鍗曟湇鍔″櫒涓嶉渶瑕佹寚瀹� - return new ConnectionConfig() + ConnectionConfig connectConfig = null; + switch (XhsParasHelper.Xhs.DataBase.DbType) { - DbType = SqlSugar.DbType.PostgreSQL,//鏁版嵁搴撶被鍨� - ConnectionString = XhsParasHelper.Xhs.DataBase.PostgreSql.ConnectString, - IsAutoCloseConnection = true,//鏄惁鑷姩鍏抽棴 - MoreSettings = new ConnMoreSettings() - { - //PgSqlIsAutoToLower = false //鏁版嵁搴撳瓨鍦ㄥぇ鍐欏瓧娈电殑 锛岄渶瑕佹妸杩欎釜璁句负false 锛屽苟涓斿疄浣撳拰瀛楁鍚嶇О瑕佷竴鏍� - }, - AopEvents = new AopEvents - { - OnLogExecuting = (sql, p) => + case DbType.PostgreSql: { - // var sqlString = UtilMethods.GetNativeSql(sql, p); - //LogHelper.Debug(sqlString); - // Console.WriteLine(sql); + connectConfig = PostgreSqlConnectionConfig; } - } - }; + break; + + case DbType.SQLite: + { + connectConfig = SQLiteConnectionConfig; + } + break; + + default: break; + } + return connectConfig; } } -- Gitblit v1.9.3