Skip to content

Commit 36a16e3

Browse files
committed
# 修复200ms慢接口 bug 走redis前有mysql耗时操作,对SqlSugar初始化部分加线程锁,避免资源消耗
1 parent 56a6c18 commit 36a16e3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

AspireIoT/ZhangPengFei.IoT.ApiService/DataBase/DataBaseManager.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ public SqlSugarClient BuildWithMySQL()
3333
//获取无参数化SQL 对性能有影响,特别大的SQL参数多的,调试使用
3434
//Console.WriteLine(UtilMethods.GetSqlString(DbType.SqlServer,sql,pars))
3535
};
36-
//注意多租户 有几个设置几个
37-
//db.GetConnection(i).Aop
36+
3837
if (Interlocked.CompareExchange(ref initialized, 1, 0) == 0)
3938
{
4039
db.DbMaintenance.CreateDatabase();

0 commit comments

Comments
 (0)