聚水潭食品类目上传

This commit is contained in:
wule committed 2026-02-23 21:28:09 +08:00
1 parent 7b06707a40
commit 1b2b6bb553
12 files changed
+430 -16

No files matched your search

@@ -419,6 +419,67 @@ namespace KJD_Web.BLL.WXXD
return new BXX.BXXProductManage().MdyProduct(inputData);
}
public string WXAddSecretSpuIdShopIdMap(string inputData)
{
if (!string.IsNullOrEmpty(inputData))
{
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
var up_secret_spu_id = RegexUtils.GetStringQuery(ref inputData, "up_secret_spu_id")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(up_secret_spu_id))
{
return "{\"code\":500,\"msg\":\"缺少商品编号1\"}";
}
var index = RegexUtils.GetStringQuery(ref inputData, "index").ParseToNullableLong();
if (index == null)
index = up_secret_spu_id.ParseToLong() % 1024;
var up_spu_id = RegexUtils.GetStringQuery(ref inputData, "up_spu_id")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(up_spu_id))
{
return "{\"code\":500,\"msg\":\"缺少商品编号2\"}";
}
var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id")?.Replace("'", "\\'");
if (string.IsNullOrEmpty(shop_id))
{
return "{\"code\":500,\"msg\":\"缺少店铺编号\"}";
}
string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString;
MysqlUtils mySql = new MysqlUtils(conn);
string sql = "select id from wxxd_product_shop_map.product_shop_map_" + index.ParseToString().PadLeft(4, '0') +
" where up_secret_spu_id='" + up_secret_spu_id + "'and shop_id='" + shop_id + "'";
DataTable dt = mySql.ExecuteDataTable(sql);
if (!string.IsNullOrEmpty(mySql.Message) || dt == null || dt.Rows == null)
{
mySql.Close();
return "{\"code\":500,\"msg\":\"失败:" + mySql.Message + "\"}";
}
if (dt.Rows.Count > 0)
{
mySql.Close();
return "{\"code\":200,\"msg\":\"数据已存在\"}";
}
sql = "insert into wxxd_product_shop_map.product_shop_map_" + index.ParseToString().PadLeft(4, '0') +
" (up_secret_spu_id,up_spu_id,shop_id) " +
" values ('" + up_secret_spu_id + "','" + up_spu_id + "','" + shop_id + "');";
mySql.ExecuteNonQuery(sql);
mySql.Close();
if (mySql.Message.IsNullOrEmpty())
{
return "{\"code\":200,\"msg\":\"成功\"}";
}
else
{
return "{\"code\":500,\"msg\":\"失败:" + mySql.Message + "\"}";
}
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string WXAddMdyAfterSale(string inputData)
{
@@ -548,7 +609,6 @@ namespace KJD_Web.BLL.WXXD
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string WXAddMdyShippingTemplate(string inputData)
{
if (!string.IsNullOrEmpty(inputData))