From 0f99680aff09e91f521b5909aab42811c1c3e6f1 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期三, 09 四月 2025 15:28:16 +0800 Subject: [PATCH] 优化Revit=>HydroModelInfo转换方法 --- Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs | 46 ++++++++++++++++------------------------------ 1 files changed, 16 insertions(+), 30 deletions(-) diff --git a/Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs b/Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs index ba33414..1086af4 100644 --- a/Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs +++ b/Service/HStation.Service.Xhs.Core/00-core/ConfigHelper.cs @@ -2,7 +2,6 @@ { internal class ConfigHelper { - /// <summary> /// 榛樿杩炴帴閰嶇疆 /// </summary> @@ -10,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; } } @@ -92,16 +89,5 @@ }; } } - - - - - - - - - - - } -} +} \ No newline at end of file -- Gitblit v1.9.3