From 0f8ab9b81c5801869a1b620dbc74a95e07c0a566 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期二, 08 十月 2024 17:47:14 +0800 Subject: [PATCH] 增加喷头界面字段 --- Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs | 45 ++++++++++++++++++++------------------------- 1 files changed, 20 insertions(+), 25 deletions(-) diff --git a/Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs b/Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs index 8adb3ac..1086af4 100644 --- a/Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs +++ b/Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs @@ -1,44 +1,39 @@ -锘縰sing HStation.Settings; -using SqlSugar; - -namespace HStation.Xhs +锘縩amespace HStation.Xhs { - public class ConfigHelper + internal class ConfigHelper { /// <summary> /// 榛樿杩炴帴閰嶇疆 /// </summary> - public static ConnectionConfig DefaultConnectionConfig + internal static ConnectionConfig DefaultConnectionConfig { 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; } } /// <summary> /// PostgreSql杩炴帴閰嶇疆 /// </summary> - public static ConnectionConfig PostgreSqlConnectionConfig + internal static ConnectionConfig PostgreSqlConnectionConfig { get { @@ -68,7 +63,7 @@ /// <summary> /// SQLite杩炴帴閰嶇疆 /// </summary> - public static ConnectionConfig SQLiteConnectionConfig + internal static ConnectionConfig SQLiteConnectionConfig { get { -- Gitblit v1.9.3