Commit 774a17d3 by jianshuqin

优化:组件功能

parent 8bb6a4b1
...@@ -12,13 +12,13 @@ namespace Bailun.DC.Common ...@@ -12,13 +12,13 @@ namespace Bailun.DC.Common
/// <summary> /// <summary>
/// 数据中心 读写库 /// 数据中心 读写库
/// </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;"; //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>
/// 数据中心 只读库 /// 数据中心 只读库
/// </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> /// <summary>
/// sku分类url /// sku分类url
/// </summary> /// </summary>
......
...@@ -319,7 +319,12 @@ namespace Bailun.DC.Services.Component ...@@ -319,7 +319,12 @@ namespace Bailun.DC.Services.Component
{ {
pageList.List.Load(reader.Item2); pageList.List.Load(reader.Item2);
} }
reader.Item2.Close(); }
MySqlConnection db = this.GetDbConnection(entity);
if (db.State == ConnectionState.Open)
{
db.Close();
db = null;
} }
break; break;
...@@ -498,6 +503,12 @@ namespace Bailun.DC.Services.Component ...@@ -498,6 +503,12 @@ namespace Bailun.DC.Services.Component
b = DataReaderToExcel(listColumn, reader.Item2, reader.Item1); b = DataReaderToExcel(listColumn, reader.Item2, reader.Item1);
} }
} }
MySqlConnection db = this.GetDbConnection(entity);
if (db.State == ConnectionState.Open)
{
db.Close();
db = null;
}
} }
else 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