From f589894c84d47b9671eef6d3a8337b6b51b32edb Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期二, 21 一月 2025 12:15:39 +0800
Subject: [PATCH] 阀门视图修改

---
 Service/HStation.Service.PhartRelation.Core/00-core/ConfigHelper.cs |   36 +++++++++++++++++-------------------
 1 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/Service/HStation.Service.PhartRelation.Core/00-core/ConfigHelper.cs b/Service/HStation.Service.PhartRelation.Core/00-core/ConfigHelper.cs
index a4b98d5..f10b88b 100644
--- a/Service/HStation.Service.PhartRelation.Core/00-core/ConfigHelper.cs
+++ b/Service/HStation.Service.PhartRelation.Core/00-core/ConfigHelper.cs
@@ -9,26 +9,24 @@
         {
             get
             {
-                //SnowFlakeSingle.WorkId = Settings.SqlSugar.SnowFlakeWorkId; 涓嶅悓鏈哄櫒閰嶇疆鐨勫敮涓�鏁板瓧; // 鍗曟湇鍔″櫒涓嶉渶瑕佹寚瀹�
-                return new ConnectionConfig()
+                ConnectionConfig connectConfig = null;
+                switch (Settings.PhartRelationParasHelper.PhartRelation.DataBase.DbType)
                 {
-                    DbType = SqlSugar.DbType.PostgreSQL,//鏁版嵁搴撶被鍨�
-                    ConnectionString = Settings.PhartRelationParasHelper.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;
             }
         }
 
@@ -43,7 +41,7 @@
                 return new ConnectionConfig()
                 {
                     DbType = SqlSugar.DbType.PostgreSQL,//鏁版嵁搴撶被鍨�
-                    ConnectionString = Settings.PhartRelationParasHelper.Xhs.DataBase.PostgreSql.ConnectString,
+                    ConnectionString = Settings.PhartRelationParasHelper.PhartRelation.DataBase.PostgreSql.ConnectString,
                     IsAutoCloseConnection = true,//鏄惁鑷姩鍏抽棴
                     MoreSettings = new ConnMoreSettings()
                     {
@@ -73,7 +71,7 @@
                 return new ConnectionConfig()
                 {
                     DbType = SqlSugar.DbType.Sqlite,//鏁版嵁搴撶被鍨�
-                    ConnectionString = Settings.PhartRelationParasHelper.Xhs.DataBase.SQLite.ConnectString,
+                    ConnectionString = Settings.PhartRelationParasHelper.PhartRelation.DataBase.SQLite.ConnectString,
                     IsAutoCloseConnection = true,//鏄惁鑷姩鍏抽棴
                     MoreSettings = new ConnMoreSettings()
                     {

--
Gitblit v1.9.3