sku文字特效尝试

This commit is contained in:
wule committed 2026-04-05 14:52:49 +08:00
1 parent b62deb2e99
commit cd0e96918b
28 files changed
+1587 -550

No files matched your search

@@ -148,7 +148,7 @@ namespace KJD_Web.BLL.BXX
string sku_edit_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_edit_json"))?.Replace("'", "\\'");
string sku_secret_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_secret_json"))?.Replace("'", "\\'");
string wx_img_map_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_img_map_json"))?.Replace("'", "\\'");
string standby3 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "standby3"))?.Replace("'", "\\'");
string problem_prod_data = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "problem_prod_data"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
{
@@ -224,8 +224,8 @@ namespace KJD_Web.BLL.BXX
sql += " p.sku_secret_json=@sku_secret_json,";
if (wx_img_map_json != null)
sql += " p.wx_img_map_json=@wx_img_map_json,";
if (!standby3.IsNullOrEmpty())
sql += " p.standby3=" + standby3 + ",";
if (!problem_prod_data.IsNullOrEmpty())
sql += " p.problem_prod_data=" + problem_prod_data + ",";
sql += " p.mdy_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',";
sql = sql.TrimEnd(',');
sql += " where spu_id='" + spu_id + "';";
@@ -369,7 +369,7 @@ namespace KJD_Web.BLL.BXX
var has_send_to_out_server = RegexUtils.GetStringQuery(ref inputData, "has_send_to_out_server")?.Replace("'", "\\'");
var real_coid = RegexUtils.GetStringQuery(ref inputData, "real_coid")?.Replace("'", "\\'");
var has_wx_format = RegexUtils.GetStringQuery(ref inputData, "has_wx_format")?.Replace("'", "\\'");
var standby3 = RegexUtils.GetStringQuery(ref inputData, "standby3")?.Replace("'", "\\'");
var problem_prod_data = RegexUtils.GetStringQuery(ref inputData, "problem_prod_data")?.Replace("'", "\\'");
var start_time = RegexUtils.GetStringQuery(ref inputData, "start_time")?.Replace("'", "\\'");
var end_time = RegexUtils.GetStringQuery(ref inputData, "end_time")?.Replace("'", "\\'");
@@ -473,12 +473,12 @@ namespace KJD_Web.BLL.BXX
{
where += " and has_wx_format='" + has_wx_format + "'";
}
if (!string.IsNullOrEmpty(standby3))
if (!string.IsNullOrEmpty(problem_prod_data))
{
if (standby3.ToLower().Contains("is null"))
where += " and p.standby3 " + standby3;
if (problem_prod_data.ToLower().Contains("is null"))
where += " and p.problem_prod_data " + problem_prod_data;
else
where += " and p.standby3='" + standby3 + "'";
where += " and p.problem_prod_data='" + problem_prod_data + "'";
}
if (start_time != null && end_time != null)
{
@@ -599,7 +599,7 @@ namespace KJD_Web.BLL.BXX
prod.sku_img_replace_base64 = row["img_base64"].ToString();
//prod.sku_img_replace_url = row["img_url"].ToString();
prod.wx_img_map_json = row["wx_img_map_json"].ToString();
standby3 = row["standby3"].IsNullOrEmpty() ? null : row["standby3"].ParseToString();
problem_prod_data = row["problem_prod_data"].IsNullOrEmpty() ? null : row["problem_prod_data"].ParseToString();
if (!prod.sku_secret_json.IsNullOrEmpty() && prod.secret_spu_id.IsNullOrEmpty())
{
@@ -1696,14 +1696,17 @@ namespace KJD_Web.BLL.BXX
string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name");
string img_md5 = RegexUtils.GetStringQuery(ref inputData, "img_md5");
string img_base64 = RegexUtils.GetStringQuery(ref inputData, "img_base64");
string product_db_id = RegexUtils.GetStringQuery(ref inputData, "product_db_id");
//string product_db_id = RegexUtils.GetStringQuery(ref inputData, "product_db_id");
string img_url = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "img_url"));
string img_type = RegexUtils.GetStringQuery(ref inputData, "img_type")?.Replace("'", "\\'");
string img_group = RegexUtils.GetStringQuery(ref inputData, "img_group")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
{
return "{\"code\":500,\"msg\":\"没有用户名\"}";
}
int sku_img_replace_id = 0;
//int sku_img_replace_id = 0;
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "";
@@ -1713,19 +1716,20 @@ namespace KJD_Web.BLL.BXX
var rst = mySql.ExecuteFirstInt(sql).ParseToLong();
if (rst <= 0)
{
sql = "insert into bxx.sku_img_replace (img_md5,img_base64) " +
"values ('" + img_md5 + "','" + img_base64 + "');";
sql = "insert into bxx.sku_img_replace (img_md5,img_base64,img_url,img_type,img_group) " +
"values ('" + img_md5 + "','" + img_base64 + "','" + img_url + "','" + img_type + "','" + img_group + "');";
rst = mySql.ExecuteInsertId(sql);
}
if (rst > 0)
{
sku_img_replace_id = (int)rst;
sql = "update bxx.product set sku_img_replace_id= "+ sku_img_replace_id + " where id=" + product_db_id + ";";
//sku_img_replace_id = (int)rst;
//sql = "update bxx.product set sku_img_replace_id= "+ sku_img_replace_id + " where id=" + product_db_id + ";";
bRst = mySql.ExecuteNonQuery(sql);
//bRst = mySql.ExecuteNonQuery(sql);
bRst = true;
}
mySql.Close();
if (bRst)
if (rst > 0 && bRst)
{
return "{\"code\":200,\"msg\":\"success\",\"sku_img_replace_id\":" + rst + "}";
}
@@ -1783,6 +1787,8 @@ namespace KJD_Web.BLL.BXX
string img_md5 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "img_md5"));
string img_base64 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "img_base64"));
string img_url = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "img_url"));
string img_type = RegexUtils.GetStringQuery(ref inputData, "img_type")?.Replace("'", "\\'");
string img_group = RegexUtils.GetStringQuery(ref inputData, "img_group")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(user_name))
{
@@ -1798,6 +1804,10 @@ namespace KJD_Web.BLL.BXX
sql += " img_base64='" + img_base64 + "',";
if (img_url != null)
sql += " img_url='" + img_url + "',";
if (img_type != null)
sql += " img_type='" + img_type + "',";
if (img_group != null)
sql += " img_group='" + img_group + "',";
sql = sql.TrimEnd(',');
sql += " where id=" + id + ";";