Commit 545a68fd by guanzhenshan

还原设置的只读实例

parent c7484aab
......@@ -110,7 +110,7 @@ namespace Bailun.DC.Services
sql += " order by t1." + parameter.sort + " " + parameter.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -207,7 +207,7 @@ namespace Bailun.DC.Services
sqlparam.Add("seller_account", account);
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -310,7 +310,7 @@ namespace Bailun.DC.Services
sqlparam.Add("seller_account", account);
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -420,7 +420,7 @@ namespace Bailun.DC.Services
fromsql += " order by " + parameter.sort + " " + parameter.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -521,7 +521,7 @@ namespace Bailun.DC.Services
var prefromsql = fromsql;
fromsql += " and t1.bailun_payment_status!='Canceled' and t1.bailun_order_status!='CantHandle'";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -613,7 +613,7 @@ namespace Bailun.DC.Services
sql += " order by " + parameter.sort + " " + parameter.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -687,7 +687,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -829,7 +829,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -983,7 +983,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -1079,7 +1079,7 @@ namespace Bailun.DC.Services
}
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -1155,7 +1155,7 @@ namespace Bailun.DC.Services
sqlparam.Add("paid_time_end", end.Value.AddDays(1));
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -1268,7 +1268,7 @@ namespace Bailun.DC.Services
}
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -1377,7 +1377,7 @@ namespace Bailun.DC.Services
}
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -1486,7 +1486,7 @@ namespace Bailun.DC.Services
sqlparam.Add("paid_time_end", end.Value.AddDays(1));
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -1630,7 +1630,7 @@ namespace Bailun.DC.Services
sql += " group by tb.platform_type";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -1867,7 +1867,7 @@ namespace Bailun.DC.Services
sql += " group by t60.source";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2057,7 +2057,7 @@ namespace Bailun.DC.Services
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2117,7 +2117,7 @@ namespace Bailun.DC.Services
sql += " order by t1." + parameter.sort + " " + parameter.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2168,7 +2168,7 @@ namespace Bailun.DC.Services
sqlparam.Add("paid_time_end", end.Value.AddDays(1));
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2274,7 +2274,7 @@ namespace Bailun.DC.Services
sql += " order by t1." + parameter.sort + " " + parameter.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2374,7 +2374,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2486,7 +2486,7 @@ namespace Bailun.DC.Services
sqlwhere += " order by t1.paid_time desc";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2586,7 +2586,7 @@ namespace Bailun.DC.Services
sqlparam.Add("shipping_status", shippingstatus);
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2681,7 +2681,7 @@ namespace Bailun.DC.Services
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2754,7 +2754,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2785,7 +2785,7 @@ namespace Bailun.DC.Services
/// <returns></returns>
public List<mSkuCategoryProfit> ListSkuCategoryProfit(string platform, DateTime start, DateTime end, string colname, string skucategoryids)
{
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -2939,7 +2939,7 @@ namespace Bailun.DC.Services
fromsql += " order by " + parameter.sort + " " + parameter.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3056,7 +3056,7 @@ namespace Bailun.DC.Services
var prefromsql = sqlwhere;
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3182,7 +3182,7 @@ namespace Bailun.DC.Services
fromsql += " order by " + request.sort + " " + request.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3218,7 +3218,7 @@ namespace Bailun.DC.Services
and t1.paid_time>='{start.ToString("yyyy-MM-dd")}' and t1.paid_time<'{end.AddDays(1).ToString("yyyy-MM-dd")}') t1";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3251,7 +3251,7 @@ namespace Bailun.DC.Services
where t1.platform_type='Ebay' and t1.website='uk' and t1.bailun_payment_status!='Canceled' and t1.paid_time>='{start.ToString("yyyy-MM-dd")}' and t1.paid_time<'{end.AddDays(1).ToString("yyyy-MM-dd")}') t1";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3270,7 +3270,7 @@ namespace Bailun.DC.Services
/// <returns></returns>
public List<Models.Ebay.dc_ebay_report_uk_config> ListEbayReportUKConfig()
{
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3290,7 +3290,7 @@ namespace Bailun.DC.Services
{
var sql = "select bailun_order_id,GROUP_CONCAT(item_id) as item_id from dc_base_oms_platform_sku where bailun_order_id in ('" + string.Join("','", orderid) + "') group by bailun_order_id;";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3319,7 +3319,7 @@ namespace Bailun.DC.Services
var sql = $"select id,account_entry_type,description,bj_date,gross_amount,item_id,account_id,currency,exchange_rate,company_id from dc_base_finance_ebay where bj_date>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and bj_date<'{end.ToString("yyyy-MM-dd HH:mm:ss")}' and account_entry_type in ('{string.Join("','", feetype)}') ";
var sqllimit = " limit " + (page - 1) * pagesize + "," + pagesize;
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3399,7 +3399,7 @@ namespace Bailun.DC.Services
sql += " order by t1.gmt_date desc";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3530,7 +3530,7 @@ namespace Bailun.DC.Services
sql += " and t1.account_entry_type in ('" + string.Join("','", feetype) + "')";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3665,7 +3665,7 @@ namespace Bailun.DC.Services
sql += "group by t10.source";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3742,7 +3742,7 @@ namespace Bailun.DC.Services
// {s2}
// group by t1.account_id) t02 on t01.seller_account=t02.account_name";
//using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
//using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
//{
// if (cn.State == System.Data.ConnectionState.Closed)
// {
......@@ -3783,7 +3783,7 @@ namespace Bailun.DC.Services
sql += " and t1.company_id=" + companyid.Value + " ";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3827,7 +3827,7 @@ namespace Bailun.DC.Services
sql += " and t1.company_id=" + companyid.Value + " ";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3857,7 +3857,7 @@ namespace Bailun.DC.Services
where t1.has_delete=0
group by t2.transaction_id";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3918,7 +3918,7 @@ namespace Bailun.DC.Services
sql += " group by t1.bailun_sku,t1.website,t1.platform_type";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3968,7 +3968,7 @@ namespace Bailun.DC.Services
sql += " group by t1.bailun_sku,t1.website,t1.platform_type";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -3994,7 +3994,7 @@ namespace Bailun.DC.Services
var sql = $@"select distinct DATE_FORMAT(t1.purchase_create_time,'%Y-%m-%d') from dc_base_oms_sku as t1 where (t1.gmt_modified >= '{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.gmt_modified <='{end.ToString("yyyy-MM-dd HH:mm:ss")}') or (
(t1.has_delete = 1 or t1.has_scalp = 1) and t1.gmt_modified >= '{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.gmt_modified <='{end.ToString("yyyy-MM-dd HH:mm:ss")}')";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4048,7 +4048,7 @@ namespace Bailun.DC.Services
sqlwhere += "group by t1.origin_order_id,t2.product_inner_code ";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4093,7 +4093,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4138,7 +4138,7 @@ namespace Bailun.DC.Services
sqlwhere += "group by t1.origin_order_id,t2.product_inner_code ";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4262,7 +4262,7 @@ namespace Bailun.DC.Services
fromsql += " order by " + parameter.sort + " " + parameter.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4379,7 +4379,7 @@ namespace Bailun.DC.Services
var prefromsql = sqlwhere;
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4454,7 +4454,7 @@ namespace Bailun.DC.Services
sql += " order by t1.refund_time desc";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4513,7 +4513,7 @@ namespace Bailun.DC.Services
sqlparam.Add("key", searchkey);
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4588,7 +4588,7 @@ namespace Bailun.DC.Services
sql += " order by " + request.sort + " " + request.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4672,7 +4672,7 @@ namespace Bailun.DC.Services
sql += (" order by t1." + request.sort + " " + request.order);
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4743,7 +4743,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4765,7 +4765,7 @@ namespace Bailun.DC.Services
{
try
{
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4829,7 +4829,7 @@ namespace Bailun.DC.Services
(select t2.bailun_order_id,t2.bailun_sku,t2.quantity_shipped,t2.warehouse_code,t2.shipping_time,t2.has_delete,t2.pick_order_id from dc_base_oms_pick t2 where t2.gmt_modified>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t2.gmt_modified<'{end.ToString("yyyy-MM-dd HH:mm:ss")}' and t2.shipping_status='TotalShipping' and t2.company_id=1 {str} {" limit " + (page - 1) * pagesize + "," + pagesize}) t2
left join dc_base_oms_sku t1 on t1.bailun_order_id=t2.bailun_order_id and t1.bailun_sku=t2.bailun_sku";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4866,7 +4866,7 @@ namespace Bailun.DC.Services
sql += $"{" limit " + (page - 1) * pagesize + "," + pagesize}";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4917,7 +4917,7 @@ namespace Bailun.DC.Services
sqlparam.Add("platform", platform);
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -4966,7 +4966,7 @@ namespace Bailun.DC.Services
sql += " group by platform_type,website,platform_sku limit "+(page-1)*pagesize+","+pagesize;
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -5006,7 +5006,7 @@ namespace Bailun.DC.Services
sql += " group by platform_sku";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -5053,7 +5053,7 @@ namespace Bailun.DC.Services
sql += " group by seller_id";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -5144,7 +5144,7 @@ namespace Bailun.DC.Services
// sql += " order by t1.refund_time desc ";
//}
//using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
//using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
//{
// if (cn.State == System.Data.ConnectionState.Closed)
// {
......@@ -5236,7 +5236,7 @@ namespace Bailun.DC.Services
sql += " order by t1.refund_time desc";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -5313,7 +5313,7 @@ namespace Bailun.DC.Services
// sqlparam.Add("paytimeend", paytimeend.Value.AddDays(1));
//}
//using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
//using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
//{
// if (cn.State == System.Data.ConnectionState.Closed)
// {
......@@ -5394,7 +5394,7 @@ namespace Bailun.DC.Services
}
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -5470,7 +5470,7 @@ namespace Bailun.DC.Services
// sqlparam.Add("paytimeend", paytimeend.Value.AddDays(1));
//}
//using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
//using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
//{
// if (cn.State == System.Data.ConnectionState.Closed)
// {
......@@ -5552,7 +5552,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -5706,7 +5706,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if(cn.State== System.Data.ConnectionState.Closed)
{
......@@ -5776,7 +5776,7 @@ namespace Bailun.DC.Services
sql += " order by t1." + parameter.sort + " " + parameter.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -5802,7 +5802,7 @@ namespace Bailun.DC.Services
public List<dc_base_finance_amazon_ad_product> ListAmazonADSku(string account, DateTime? start, DateTime? end, int? companyid,int? type)
{
var sqlparam = new DynamicParameters();
var sql = "select t2.account_name,t1.sku,t1.currency,cost,(cost*exchange_rate) cost_rmb,report_date,asin,t2.site_en,t1.type from dc_base_finance_amazon_ad_product t1 join dc_base_company_account t2 on t1.account_id=t2.account_id ";
var sql = "select t2.account_name,t1.sku,t1.currency,cost,(cost*exchange_rate) cost_rmb,report_date,asin,t2.site_en from dc_base_finance_amazon_ad_product t1 join dc_base_company_account t2 on t1.account_id=t2.account_id ";
if (!string.IsNullOrEmpty(account))
{
......@@ -5836,7 +5836,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -5935,7 +5935,7 @@ namespace Bailun.DC.Services
sql += " and t1.type=" + type.Value;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6051,7 +6051,7 @@ namespace Bailun.DC.Services
sql += " group by t10.source ";
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6108,7 +6108,7 @@ namespace Bailun.DC.Services
sqlparam.Add("end", end.Value.AddDays(1));
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6159,7 +6159,7 @@ namespace Bailun.DC.Services
sqlparam.Add("end", end.Value.AddDays(1));
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6209,7 +6209,7 @@ namespace Bailun.DC.Services
sqlparam.Add("end", end.Value.AddDays(1));
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6264,7 +6264,7 @@ namespace Bailun.DC.Services
sqlparam.Add("end", end.Value.AddDays(1));
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6313,7 +6313,7 @@ namespace Bailun.DC.Services
sqlparam.Add("end", end.Value.AddDays(1));
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6362,7 +6362,7 @@ namespace Bailun.DC.Services
sqlparam.Add("end", end.Value.AddDays(1));
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6383,7 +6383,7 @@ namespace Bailun.DC.Services
{
try
{
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6449,7 +6449,7 @@ namespace Bailun.DC.Services
sql += " and t1." + parameter.sort + " " + parameter.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6492,7 +6492,7 @@ namespace Bailun.DC.Services
sqlparam.Add("companyid", companyid.Value);
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6536,7 +6536,7 @@ namespace Bailun.DC.Services
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6581,7 +6581,7 @@ namespace Bailun.DC.Services
sql += " group by item_id ";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if(cn.State== System.Data.ConnectionState.Closed)
{
......@@ -6699,7 +6699,7 @@ namespace Bailun.DC.Services
sql += " group by DATE_FORMAT(tb.paid_time,'%Y-%m-%d')";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -6849,7 +6849,7 @@ namespace Bailun.DC.Services
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -7060,7 +7060,7 @@ namespace Bailun.DC.Services
sql += " group by tb.platform_type";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -7214,7 +7214,7 @@ namespace Bailun.DC.Services
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -7339,7 +7339,7 @@ namespace Bailun.DC.Services
sql += " group by t1.platform_type";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -7400,7 +7400,7 @@ namespace Bailun.DC.Services
sql += " order by t1."+request.sort+" "+request.order;
}
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -7429,7 +7429,7 @@ namespace Bailun.DC.Services
{
var sql = $"select Count(id) id,sum(amount_sales*seller_order_exchange_rate) amount_sales,sum(profit_total) profit_total,sum(profit_total)/sum(amount_sales*seller_order_exchange_rate) as profit_rate from dc_base_oms_order where create_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and create_time<'{end.ToString("yyyy-MM-dd HH:mm:ss")}'";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -7472,7 +7472,7 @@ namespace Bailun.DC.Services
sql += " limit "+(page-1)*pagesize+","+pagesize;
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......@@ -7510,7 +7510,7 @@ namespace Bailun.DC.Services
sql += " group by t1.platform_type,t1.website,t1.platform_type,t1.bailun_account_id";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString))
{
if (cn.State == System.Data.ConnectionState.Closed)
{
......
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