1打包逻辑优化 2代理逻辑优化 3新的拼多多数据格式支持

This commit is contained in:
wule committed 2026-07-08 12:17:47 +08:00
1 parent f703e15f11
commit 554d1f4b4f
30 files changed
+1400 -82

No files matched your search

@@ -24,9 +24,10 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var erp_shop_id_in = RegexUtils.GetStringQuery(ref inputData, "erp_shop_id_in")?.Replace("'", "\\'");
if (erp_shop_id_in.IsNullOrEmpty())
var erp_order_id_in = RegexUtils.GetStringQuery(ref inputData, "erp_order_id_in")?.Replace("'", "\\'");
if (erp_shop_id_in.IsNullOrEmpty() && erp_order_id_in.IsNullOrEmpty())
{
return "{\"code\":500,\"msg\":\"未指定店铺\"}";
return "{\"code\":500,\"msg\":\"未指定店铺和订单\"}";
}
var query_status = RegexUtils.GetStringQuery(ref inputData, "query_status")?.Replace("'", "\\'");
var purchase_status = RegexUtils.GetStringQuery(ref inputData, "purchase_status")?.Replace("'", "\\'");
@@ -46,6 +47,8 @@ namespace KJD_Web.BLL.WXXD
string where = "";
if (!string.IsNullOrWhiteSpace(erp_shop_id_in))
where += " and o.shop_id in (" + erp_shop_id_in + ")";
if (!string.IsNullOrWhiteSpace(erp_order_id_in))
where += " and o.order_id in ('" + erp_order_id_in.Replace(",", "','") + "')";
if (!string.IsNullOrWhiteSpace(query_status))
where += " and o.status = " + query_status;
if (!string.IsNullOrWhiteSpace(purchase_status))
@@ -825,5 +828,42 @@ namespace KJD_Web.BLL.WXXD
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string WXUpdateErpSoftRemark(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
if (!WXUserManage.GetSign(inputData))
return "{\"code\":999,\"msg\":\"校验失败\"}";
var timeCalc = DateTime.Now;
string order_id = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "order_id"))?.Replace("'", "\\'");
string soft_remark = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "soft_remark"))?.Replace("'", "\\'");
if (string.IsNullOrEmpty(order_id))
return "{\"code\":500,\"msg\":\"订单ID不能为空\"}";
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "";
var count = -1;
sql = " update `erp`.`oms_wei_order` set ";
if (!string.IsNullOrEmpty(soft_remark))
sql += " soft_remark=" + soft_remark + ",";
sql = sql.TrimEnd(',');
sql += " where order_id = '" + order_id + "';";
count = mySql.ExecuteAffectedRows(sql);
mySql.Close();
if (!string.IsNullOrEmpty(mySql.Message))
{
return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"affected_rows\":" + count + "}";
}
return "{\"code\":200,\"msg\":\"success\",\"affected_rows\":" + count + "}";
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
}
}