diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 9138456..ff653e5 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -168,7 +168,7 @@ namespace AllBase public static int MallId = 0; public static DateTime LoginTime = DateTime.Now; public static int ReceiverId = 0; - //public static string TbTokenUrl = ""; + //////public static string TbTokenUrl = ""; public static string NewCookies = ""; public static bool MustGetShopInfo = false; public static bool MustGetFormAlive = false; diff --git a/KJDService/KJD_WebService/BLL/ProductManage.cs b/KJDService/KJD_WebService/BLL/ProductManage.cs index 606eb8a..dbac4ee 100644 --- a/KJDService/KJD_WebService/BLL/ProductManage.cs +++ b/KJDService/KJD_WebService/BLL/ProductManage.cs @@ -298,6 +298,7 @@ namespace KJD_Web.BLL add_product_remaining = add_product_remaining - 1; sql += "\r\n"; sql += "update kjd.shop set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";"; + //sql += "update kjd.shop_count set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";"; } var rst = mySql.ExecuteNonQuery(sql); mySql.Close(); diff --git a/KJDService/KJD_WebService/BLL/ProductThirdManage.cs b/KJDService/KJD_WebService/BLL/ProductThirdManage.cs index 2230814..ff01ce6 100644 --- a/KJDService/KJD_WebService/BLL/ProductThirdManage.cs +++ b/KJDService/KJD_WebService/BLL/ProductThirdManage.cs @@ -50,13 +50,37 @@ namespace KJD_Web.BLL var rst = mySql.ExecuteFirstInt(sql).ParseToLong(); if (rst <= 0) { - + //product_json = product_json.Replace("*", "*").Replace("|", "|"); + //ext_code = product_json.Replace("*", "*").Replace("|", "|"); sql = "insert into kjd.third_product (spu_id,skc_id,cat_id,cat_name,product_name,ext_code,main_img,product_json,size_json,notes,product_md5,add_time,mdy_time) " + "values ('" + spu_id + "','" + skc_id + "','" + cat_id + "','" + cat_name + "','" + product_name + "','" + ext_code + "','" + main_img + "','" + product_json + "','" + size_json + "','" + notes + "','" + product_md5 + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; - rst = mySql.ExecuteInsertId(sql); + //rst = mySql.ExecuteInsertId(sql); + + sql = "insert into kjd.third_product (spu_id,skc_id,cat_id,cat_name,product_name," + + "ext_code,main_img,product_json,size_json,notes,product_md5,add_time,mdy_time) " + + "values (@spu_id,@skc_id,@cat_id,@cat_name,@product_name," + + "@ext_code,@main_img,@product_json,@size_json,@notes,@product_md5," + + "@add_time,@mdy_time);"; + string add_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + string mdy_time = add_time; + List paramLst = new List(); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "spu_id", Value = spu_id, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "skc_id", Value = skc_id, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "cat_id", Value = cat_id, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "cat_name", Value = cat_name, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "product_name", Value = product_name, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "ext_code", Value = ext_code, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "main_img", Value = main_img, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "product_json", Value = product_json, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "size_json", Value = size_json, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "notes", Value = notes.ParseToString(), }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "product_md5", Value = product_md5, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "add_time", Value = add_time, }); + paramLst.Add(new MySqlParameter() { DbType = DbType.String, ParameterName = "mdy_time", Value = mdy_time, }); + rst = mySql.ExecuteInsertId(sql, paramLst.ToArray()); mySql.Close(); } if (rst > 0) @@ -301,6 +325,7 @@ namespace KJD_Web.BLL add_product_remaining = add_product_remaining - 1; sql += "\r\n"; sql += "update kjd.shop set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";"; + //sql += "update kjd.shop_count set add_product_remaining=" + add_product_remaining + " where shop_id=" + shop_id + ";"; } var rst = mySql.ExecuteNonQuery(sql); mySql.Close();