Commit 774a17d3 by jianshuqin

优化:组件功能

parent 8bb6a4b1
......@@ -12,13 +12,13 @@ namespace Bailun.DC.Common
/// <summary>
/// 数据中心 读写库
/// </summary>
public static string ConnectionString = "server=gz-cdb-kp7s5i79.sql.tencentcdb.com;port=61691;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;SslMode=none;Allow User Variables=True;pool size=800;";
public static string ConnectionString = "server=gz-cdb-kp7s5i79.sql.tencentcdb.com;port=61691;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;SslMode=none;Allow User Variables=True;";
//public static string ConnectionString_read = "server=gz-cdbrg-qdyec2j3.sql.tencentcdb.com;port=59667;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;";
/// <summary>
/// 数据中心 只读库
/// </summary>
public static string ConnectionString_read = "server=gz-cdbrg-qdyec2j3.sql.tencentcdb.com;port=59667;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;SslMode=none;Allow User Variables=True;pool size=800;";
public static string ConnectionString_read = "server=gz-cdbrg-qdyec2j3.sql.tencentcdb.com;port=59667;database=bailun_datacenter;uid=root;password=#7kfnymAM$Y9-Ntf;SslMode=none;Allow User Variables=True;";
/// <summary>
/// sku分类url
/// </summary>
......
......@@ -319,7 +319,12 @@ namespace Bailun.DC.Services.Component
{
pageList.List.Load(reader.Item2);
}
reader.Item2.Close();
}
MySqlConnection db = this.GetDbConnection(entity);
if (db.State == ConnectionState.Open)
{
db.Close();
db = null;
}
break;
......@@ -498,6 +503,12 @@ namespace Bailun.DC.Services.Component
b = DataReaderToExcel(listColumn, reader.Item2, reader.Item1);
}
}
MySqlConnection db = this.GetDbConnection(entity);
if (db.State == ConnectionState.Open)
{
db.Close();
db = null;
}
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment