商品随机sku价格顺序提交尝试

This commit is contained in:
wule committed 2025-08-07 19:48:45 +08:00
1 parent c66ce84d26
commit f92e8ed79b
15 files changed
+696 -299

No files matched your search

@@ -395,7 +395,8 @@ namespace KJD_Web.BLL
var add_times = RegexUtils.GetStringQuery(ref inputData, "add_times")?.Replace("'", "\\'");
long l_draft_id = draft_id.ParseToLong();
long l_table_id = l_draft_id % 128;
long l_spu_map_table_id = l_draft_id % 128;
long l_select_map_table_id = id.ParseToLong() % 64;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
@@ -404,8 +405,12 @@ namespace KJD_Web.BLL
//sql += "set @@autocommit=0;\r\n";
sql += "START TRANSACTION;\r\n";
if (!string.IsNullOrEmpty(up_spu_id) && !string.IsNullOrEmpty(draft_id))
sql += "insert into kjd_map.spu_map_" + l_table_id +
{
sql += "insert into kjd_map.spu_map_" + l_spu_map_table_id +
" (draft_id,from_spu_id,shop_id) values(" + draft_id + "," + up_spu_id + ",'" + shop_id + "');\r\n";
sql += "insert into kjd_map.product_select_map_" + l_select_map_table_id +
" (product_id,product_select_db_id,shop_id) values(" + draft_id + "," + id + ",'" + shop_id + "');\r\n";
}
sql += "update kjd.product_select set";
if (draft_id != null)
sql += " draft_id='" + draft_id + "',";