1Jit相关功能 50% 2 其他部分优化修改

This commit is contained in:
wule committed 2025-11-26 18:27:21 +08:00
1 parent 4d5ea741d7
commit e77914bafc
49 files changed
+2576 -419

No files matched your search

@@ -197,31 +197,32 @@ namespace KJD_Web.BLL
else
{
if (isDetail)
sql = "select * from kjd.product p where p.is_del=0";
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.group," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words," +
"p.product_get_type 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.group," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.product_get_type" +
",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 p.is_del=0";
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.cost_price,p.product_get_type" +
" 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.group," +
"p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.cost_price,p.product_get_type" +
",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 p.is_del=0";
if (!isDetail && product_get_type != "all") // 详情必须从列表页面进入,不用限制
sql += " and p.product_get_type=" + product_get_type;
sql += " AND p.product_get_type=" + product_get_type;
//where子句
sql += where;
if (!isDetail && !string.IsNullOrEmpty(get_select_count))
sql += " group by p.id";
sql += " GROUP BY p.id";
if (sort_field == "select_total_count")
sql += " order by p.select_total_count desc, p.id desc";
sql += " ORDER BY p.select_total_count desc, p.id desc";
else
sql += " order by p.id desc";
sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size;
sql += " ORDER BY p.id desc";
sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size;
dt = mySql.ExecuteDataTable(sql);
}
@@ -250,9 +251,10 @@ namespace KJD_Web.BLL
notes = row["notes"].ToString(),
group = row["group"].ToString(),
select_total_count = row["select_total_count"].ParseToInt(),
end_words = row["end_words"].ParseToString(),
fission_words = row["fission_words"].ParseToString(),
head_words = row["head_words"].ParseToString(),
end_words = row["end_words"].ParseToString(),
cost_price = row["cost_price"].ParseToString(),
product_get_type = row["product_get_type"].ParseToInt(), //0母店采集 1前端直采
};
if (isDetail)
@@ -369,6 +371,7 @@ namespace KJD_Web.BLL
string fission_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_words"))?.Replace("'", "\\'");
string head_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "head_words"))?.Replace("'", "\\'");
string end_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "end_words"))?.Replace("'", "\\'");
string cost_price = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cost_price"))?.Replace("'", "\\'");
string product_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_json"))?.Replace("'", "\\'");
string size_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "size_json"))?.Replace("'", "\\'");
string original_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "original_json"))?.Replace("'", "\\'");
@@ -395,6 +398,8 @@ namespace KJD_Web.BLL
sql += " head_words='" + head_words + "',";
if (end_words != null)
sql += " end_words='" + end_words + "',";
if (cost_price != null)
sql += " cost_price='" + cost_price + "',";
if (product_json != null)
sql += " product_json='" + product_json + "',";
if (size_json != null)
@@ -1096,14 +1101,22 @@ namespace KJD_Web.BLL
string sql = "select count(id) from kjd.sku_img s where 1=1";
string where = "";
//if (!string.IsNullOrWhiteSpace(search_db_id))
// where += " and s.id like '%" + search_db_id + "%'";
//if (!string.IsNullOrWhiteSpace(search_product_id))
// where += " and s.product_id like '%" + search_product_id + "%'";
//if (!string.IsNullOrWhiteSpace(search_spec_id))
// where += " and s.spec_id like '%" + search_spec_id + "%'";
//if (!string.IsNullOrWhiteSpace(search_original_img_url))
// where += " and s.original_img_url like '%" + search_original_img_url + "%'";
if (!string.IsNullOrWhiteSpace(search_db_id))
where += " and s.id like '%" + search_db_id + "%'";
where += " and s.id = '" + search_db_id + "'";
if (!string.IsNullOrWhiteSpace(search_product_id))
where += " and s.product_id like '%" + search_product_id + "%'";
where += " and s.product_id = '" + search_product_id + "'";
if (!string.IsNullOrWhiteSpace(search_spec_id))
where += " and s.spec_id like '%" + search_spec_id + "%'";
where += " and s.spec_id = '" + search_spec_id + "'";
if (!string.IsNullOrWhiteSpace(search_original_img_url))
where += " and s.original_img_url like '%" + search_original_img_url + "%'";
where += " and s.original_img_url = '" + search_original_img_url + "'";
if (!string.IsNullOrEmpty(search_db_ids))
where += " and s.id in (" + search_db_ids + ")";
sql += where;