From e93d2a1c8fdfadf50f9fbf9e30c04ffe73df023a Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 14 八月 2024 16:26:03 +0800
Subject: [PATCH] 11

---
 MES.Service/DB/Repository.cs |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/MES.Service/DB/Repository.cs b/MES.Service/DB/Repository.cs
index 366f787..9906f8f 100644
--- a/MES.Service/DB/Repository.cs
+++ b/MES.Service/DB/Repository.cs
@@ -1,14 +1,14 @@
-锘縰sing SqlSugar;
+锘縰sing MES.Service.util;
+using SqlSugar;
 
 namespace MES.Service.DB;
 
 public class Repository<T> : SimpleClient<T> where T : class, new()
 {
-    public static SqlSugarScope Db = new(new ConnectionConfig
+    protected static SqlSugarScope Db = new(new ConnectionConfig
         {
             DbType = DbType.Oracle,
-            ConnectionString =
-                @"Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.11.251)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = sg_prd; Password=sgprd",
+            ConnectionString = AppsettingsUtility.Settings.DataBaseConn,
             IsAutoCloseConnection = true
         },
         db =>
@@ -25,7 +25,7 @@
         if (context == null) Context = Db;
     }
 
-    public int UseTransaction(Func<SqlSugarScope, int> action)
+    protected int UseTransaction(Func<SqlSugarScope, int> action)
     {
         try
         {

--
Gitblit v1.9.3