机会商品采集功能

This commit is contained in:
wule committed 2025-12-29 19:56:10 +08:00
1 parent dae2bea6ef
commit c0b3583fef
18 files changed
+913 -157

No files matched your search

@@ -39,6 +39,11 @@ namespace KJD_Web.BLL.BXX
string size_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "size_json"))?.Replace("'", "\\'");
string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img"))?.Replace("'", "\\'");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'");
string product_get_type = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_get_type"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(product_get_type))
{
product_get_type = "母店采集";
}
if (string.IsNullOrEmpty(user_name))
{
@@ -51,10 +56,10 @@ namespace KJD_Web.BLL.BXX
//UPDATE `bxx`.`product` set sku_img_replace_id=18 where prod_type = '拖鞋' and sku_img_replace_id<12 order by rand() limit 50;
sql = "insert into bxx.product (from_shop_id,spu_id,skc_id,main_cat_id,main_cat_name,cat_id,cat_name,price_text," +
"product_name,ext_code,main_img,product_json,size_json,notes,add_time,mdy_time) " +
"product_name,ext_code,main_img,product_json,size_json,notes,product_get_type,add_time,mdy_time) " +
"values ('" + from_shop_id + "','" + spu_id + "','" + skc_id + "','" + main_cat_id + "','" + main_cat_name + "','" +
cat_id + "','" + cat_name + "','" + price_text + "','" + product_name + "','" + ext_code + "','" + main_img + "','" +
product_json + "','" + size_json + "','" + notes + "','" +
product_json + "','" + size_json + "','" + notes + "','" + product_get_type + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -172,6 +177,7 @@ namespace KJD_Web.BLL.BXX
var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'");
var get_select_count = RegexUtils.GetStringQuery(ref inputData, "get_select_count")?.Replace("'", "\\'");
var select_shop_id = RegexUtils.GetStringQuery(ref inputData, "select_shop_id")?.Replace("'", "\\'");
var from_shop_id = RegexUtils.GetStringQuery(ref inputData, "from_shop_id")?.Replace("'", "\\'");
var sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'");
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
@@ -197,6 +203,8 @@ namespace KJD_Web.BLL.BXX
where += " and p.group like '%" + search_group + "%'";
if (!string.IsNullOrWhiteSpace(search_notes))
where += " and p.notes like '%" + search_notes + "%'";
if (!string.IsNullOrEmpty(from_shop_id))
where += " and p.from_shop_id ='" + from_shop_id + "'";
if (!string.IsNullOrEmpty(search_db_ids))
where += " and p.id in (" + search_db_ids + ")";
sql += where;
@@ -217,14 +225,14 @@ namespace KJD_Web.BLL.BXX
" 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,s.img_url,e.ext_code_price" +
" 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,p.product_get_type,s.img_url,e.ext_code_price" +
" FROM bxx.product p " +
" left join bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" +
" LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" +
" 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,s.img_url,COUNT(se.id) AS select_count," +
" 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,p.product_get_type,s.img_url,COUNT(se.id) AS select_count," +
" e.ext_code_price" +
" FROM bxx.product p left join bxx.sku_img_replace s ON p.sku_img_replace_id=s.id LEFT JOIN bxx.product_select se ON p.id=se.out_product_id AND se.shop_id='" + select_shop_id + "' " +
" LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" +
@@ -276,6 +284,7 @@ namespace KJD_Web.BLL.BXX
head_words = row["head_words"].ParseToString(),
sku_img_replace_id = row["sku_img_replace_id"].ParseToInt(),
sku_img_replace_url = row["img_url"].ToString(),
product_get_type_text = row["product_get_type"].ToString(),
};
if (isDetail)
{
@@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
<ProjectExtensions>
@@ -71,5 +71,6 @@ namespace KJD_Web.Model
public string head_words { get; set; }
public string end_words { get; set; }
public int product_get_type { get; set; }
public string product_get_type_text { get; set; }
}
}