diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
index 84c6a54..ab6d246 100644
--- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
+++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs
@@ -40,6 +40,8 @@ namespace KJD_Web.BLL.BXX
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("'", "\\'");
+ string sale_count = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_get_type"))?.Replace("'", "\\'");
+ string sale_count_text = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_get_type"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(product_get_type))
{
product_get_type = "母店采集";
@@ -56,10 +58,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,product_get_type,add_time,mdy_time) " +
+ "product_name,ext_code,main_img,product_json,size_json,notes,product_get_type,sale_count,sale_count_text,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_get_type + "','" +
+ product_json + "','" + size_json + "','" + notes + "','" + product_get_type + "','" + sale_count + "','" + sale_count_text + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" +
DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');";
var rst = mySql.ExecuteNonQuery(sql);
@@ -102,6 +104,8 @@ namespace KJD_Web.BLL.BXX
string main_img = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_img"))?.Replace("'", "\\'");
string group = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "group"))?.Replace("'", "\\'");
string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'");
+ string sale_count = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sale_count"))?.Replace("'", "\\'");
+ string sale_count_text = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sale_count_text"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
{
@@ -139,6 +143,10 @@ namespace KJD_Web.BLL.BXX
sql += " p.group='" + group + "',";
if (notes != null)
sql += " p.notes='" + notes + "',";
+ if (sale_count != null)
+ sql += " p.sale_count='" + sale_count + "',";
+ if (sale_count_text != null)
+ sql += " p.sale_count_text='" + sale_count_text + "',";
sql += " p.mdy_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',";
sql = sql.TrimEnd(',');
sql += " where spu_id='" + spu_id + "';";
@@ -228,14 +236,16 @@ 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,p.product_get_type,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," +
+ " p.sale_count,p.sale_count_text,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,p.product_get_type,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," +
+ " p.sale_count,p.sale_count_text,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" +
@@ -288,6 +298,8 @@ namespace KJD_Web.BLL.BXX
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(),
+ sale_count = row["sale_count"].ParseToInt(),
+ sale_count_text = row["sale_count_text"].ToString(),
};
if (isDetail)
{
@@ -539,6 +551,7 @@ namespace KJD_Web.BLL.BXX
var in_skc_ids = RegexUtils.GetStringQuery(ref inputData, "in_skc_ids")?.Replace("'", "\\'");
var in_groups = RegexUtils.GetStringQuery(ref inputData, "in_groups")?.Replace("'", "\\'");
var in_cates = RegexUtils.GetStringQuery(ref inputData, "in_cates")?.Replace("'", "\\'");
+ var product_get_type = RegexUtils.GetStringQuery(ref inputData, "product_get_type")?.Replace("'", "\\'");
int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt();
int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50);
@@ -569,6 +582,8 @@ namespace KJD_Web.BLL.BXX
in_cates = "'" + string.Join("','", in_cates.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'";
where += " and (p.cat_name in (" + in_cates + ") or p.main_cat_name in (" + in_cates + "))";
}
+ if (!string.IsNullOrEmpty(product_get_type))
+ where += " and p.product_get_type ='" + product_get_type + "'";
sql += where;
@@ -582,7 +597,7 @@ namespace KJD_Web.BLL.BXX
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.group,p.notes,p.add_time,p.mdy_time,p.select_total_count," +
+ "p.product_name,p.main_img,p.group,p.notes,p.add_time,p.mdy_time,p.select_total_count,p.product_get_type,p.sale_count,p.sale_count_text," +
"p.fission_words,p.head_words,p.end_words from bxx.product p where p.is_del=0";
//where子句
@@ -625,6 +640,9 @@ namespace KJD_Web.BLL.BXX
end_words = row["end_words"].ParseToString(),
fission_words = row["fission_words"].ParseToString(),
head_words = row["head_words"].ParseToString(),
+ product_get_type_text = row["product_get_type"].ParseToString(),
+ sale_count = row["sale_count"].ParseToInt(),
+ sale_count_text = row["sale_count_text"].ToString(),
};
productLst.Add(prod);
}
diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj.user b/KJDService/KJD_WebService/KJD_WebService.csproj.user
index 4bcdc04..1b87364 100644
--- a/KJDService/KJD_WebService/KJD_WebService.csproj.user
+++ b/KJDService/KJD_WebService/KJD_WebService.csproj.user
@@ -8,7 +8,7 @@
- Release|Any CPU
+ Debug|Any CPU
ShowAllFiles
diff --git a/KJDService/KJD_WebService/Model/DBProductResultParam.cs b/KJDService/KJD_WebService/Model/DBProductResultParam.cs
index 8f5578e..49ba650 100644
--- a/KJDService/KJD_WebService/Model/DBProductResultParam.cs
+++ b/KJDService/KJD_WebService/Model/DBProductResultParam.cs
@@ -72,5 +72,8 @@ namespace KJD_Web.Model
public string end_words { get; set; }
public int product_get_type { get; set; }
public string product_get_type_text { get; set; }
+
+ public int sale_count { get; set; }
+ public string sale_count_text { get; set; }
}
}
\ No newline at end of file