From ca5f300a7cef85d22b5e0f9d59d117c49f9909b3 Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期二, 19 十一月 2024 09:42:16 +0800
Subject: [PATCH] 完善资产界面

---
 Service/HStation.Service.Assets.Core/00-core/ConfigHelper.cs |   38 ++++++++++++++++++--------------------
 1 files changed, 18 insertions(+), 20 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..d0ac06f 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 (AssetsParasHelper.Assets.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;
             }
         }
 
@@ -43,7 +41,7 @@
                 return new ConnectionConfig()
                 {
                     DbType = SqlSugar.DbType.PostgreSQL,//鏁版嵁搴撶被鍨�
-                    ConnectionString = XhsParasHelper.Xhs.DataBase.PostgreSql.ConnectString,
+                    ConnectionString = HStation.Settings.AssetsParasHelper.Assets.DataBase.PostgreSql.ConnectString,
                     IsAutoCloseConnection = true,//鏄惁鑷姩鍏抽棴
                     MoreSettings = new ConnMoreSettings()
                     {
@@ -73,7 +71,7 @@
                 return new ConnectionConfig()
                 {
                     DbType = SqlSugar.DbType.Sqlite,//鏁版嵁搴撶被鍨�
-                    ConnectionString = XhsParasHelper.Xhs.DataBase.SQLite.ConnectString,
+                    ConnectionString = AssetsParasHelper.Assets.DataBase.SQLite.ConnectString,
                     IsAutoCloseConnection = true,//鏄惁鑷姩鍏抽棴
                     MoreSettings = new ConnMoreSettings()
                     {

--
Gitblit v1.9.3