1调整拼多多工作台cookie时的cef user-agent,防止掉线

2优化商品删除逻辑,修复bug
3查找pdd版本长时间运行程序卡死原因并尝试修复
4pdd上货记住主要上货选项避免每次都重新选择
This commit is contained in:
wule committed 2025-10-08 18:23:00 +08:00
1 parent 61264a5a99
commit 5e9bdd1700
19 files changed
+612 -557

No files matched your search

@@ -180,7 +180,7 @@ namespace KJD_Web.BLL.BXX
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select count(id) from bxx.product p where 1=1";
string sql = "select count(id) from bxx.product p where p.is_del=0";
string where = "";
if (!string.IsNullOrWhiteSpace(search_spu))
@@ -211,15 +211,15 @@ namespace KJD_Web.BLL.BXX
else
{
if (isDetail)
sql = "select p.*,s.img_base64,s.img_url from bxx.product p left join bxx.sku_img_replace s ON p.sku_img_replace_id=s.id where 1=1";
sql = "select p.*,s.img_base64,s.img_url from bxx.product p left join bxx.sku_img_replace s ON p.sku_img_replace_id=s.id where p.is_del=0";
else if (string.IsNullOrEmpty(get_select_count))
sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name,p.main_img,p.notes," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group from bxx.product p where 1=1";
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group from bxx.product p where p.is_del=0";
else
sql = "SELECT p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name,p.main_img,p.notes," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group,COUNT(s.id) AS select_count " +
"FROM bxx.product p LEFT JOIN bxx.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "' " +
"WHERE 1=1";
"WHERE p.is_del=0";
//where子句
sql += where;
@@ -316,7 +316,7 @@ namespace KJD_Web.BLL.BXX
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "SELECT DISTINCT p.group FROM `bxx`.`product` p";
string sql = "SELECT DISTINCT p.group FROM `bxx`.`product` p where p.is_del=0";
string where = "";
sql += where;
@@ -459,7 +459,7 @@ namespace KJD_Web.BLL.BXX
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select count(id) from bxx.product p where 1=1";
string sql = "select count(id) from bxx.product p where p.is_del=0";
string where = "";
if (!string.IsNullOrEmpty(in_ext_codes))
@@ -491,7 +491,7 @@ namespace KJD_Web.BLL.BXX
{
sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code," +
"p.product_name,p.main_img,p.group,p.notes,p.add_time,p.mdy_time,p.select_total_count," +
"p.fission_words,p.head_words,p.end_words from bxx.product p where 1=1";
"p.fission_words,p.head_words,p.end_words from bxx.product p where p.is_del=0";
//where子句
sql += where;
@@ -575,7 +575,8 @@ namespace KJD_Web.BLL.BXX
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "delete from bxx.product where id='" + id + "'";
//string sql = "delete from bxx.product where id='" + id + "'";
string sql = "update bxx.product set is_del=1 where id='" + id + "'";
var rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
@@ -1004,6 +1005,8 @@ namespace KJD_Web.BLL.BXX
}
if (!string.IsNullOrWhiteSpace(search_user_notes))
where += " and s.user_notes like '%" + search_user_notes + "%'";
where += " and p.id_del=0";
if (!string.IsNullOrWhiteSpace(search_spu))
where += " and p.spu_id like '%" + search_spu + "%'";
if (!string.IsNullOrWhiteSpace(search_skc))
@@ -91,7 +91,7 @@ namespace KJD_Web.BLL
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select count(id) from kjd.product p where 1=1";
string sql = "select count(id) from kjd.product p where p.is_del=0";
string where = "";
if (!string.IsNullOrWhiteSpace(search_spu))
@@ -120,15 +120,15 @@ namespace KJD_Web.BLL
else
{
if (isDetail)
sql = "select * from kjd.product p where 1=1";
sql = "select * from kjd.product p where p.is_del=0";
else if (string.IsNullOrEmpty(get_select_count))
sql = "select p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words from kjd.product p where 1=1";
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words from kjd.product p where p.is_del=0";
else
sql = "SELECT p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,COUNT(s.id) AS select_count " +
"FROM kjd.product p LEFT JOIN kjd.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "' " +
"WHERE 1=1";
"WHERE p.is_del=0";
//where子句
sql += where;
@@ -212,8 +212,8 @@ namespace KJD_Web.BLL
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "delete from kjd.product where id='"
+ id + "'";
//string sql = "delete from kjd.product where id='" + id + "'";
string sql = "update kjd.product set is_del=1 where id='" + id + "'";
var rst = mySql.ExecuteNonQuery(sql);
mySql.Close();
@@ -525,6 +525,8 @@ namespace KJD_Web.BLL
}
if (!string.IsNullOrWhiteSpace(search_user_notes))
where += " and s.user_notes like '%" + search_user_notes + "%'";
where += " and p.is_del=0";
if (!string.IsNullOrWhiteSpace(search_spu))
where += " and p.spu_id like '%" + search_spu + "%'";
if (!string.IsNullOrWhiteSpace(search_skc))