1另外一种拼多多外部商品识别入库并上传到微信小店 2微信订单读取显示佣金 3微信上货裂变逻辑优化

This commit is contained in:
wule_5900x committed 2026-06-01 03:00:27 +08:00
1 parent 3f6a91c164
commit 7601f5b2f3
13 files changed
+1300 -605

No files matched your search

@@ -1557,12 +1557,21 @@ namespace TemuKJD.WXForms.ProductForms
}
#region 将聚水潭产品数据格式进行转换成pdd格式统一上传,匹配加密的spuCode和skuCoke 微信小店的货号spuCode和外部商品编号outProductId/out_product_id对应加密的聚水潭goodsId
if (dbProd.product_get_type_text == "厂商直采" && dbProd.sku_secret_json != null && dbProd.sku_secret_json.Contains("goodsId"))
if (dbProd.product_get_type_text == "厂商直采")
{
if (dbProd.sku_secret_json.IsNullOrEmpty() || !dbProd.sku_secret_json.Contains("goodsId"))
{
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询格式错误\"}";
}
if (dbProd.wx_cat_leaf.IsNullOrZero() || dbProd.send_to_out_server != 1 || dbProd.distribution_set != 1)
{
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询校验错误\"}";
}
string convertRst = "";
var pInfo = new PDDProdFormConverter().JstPddProdToPddConvert(out convertRst, dbProd);
if (!string.IsNullOrEmpty(convertRst))
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询错误 " + convertRst + "\"}";
return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询错误 " + convertRst + "\"}";
}
#endregion
@@ -2591,8 +2600,9 @@ namespace TemuKJD.WXForms.ProductForms
}
}
// 官方库1688厂家数据必须有退货地址才能上传,用户自采数据使用店铺或默认退货地址
else if (dbProd.product_get_type_text == "1688厂家" && dbProd.add_user_name == "admin")
// 官方库1688厂家数据必须有退货地址才能上传,用户自采数据使用店铺或默认退货地址 26.5.29
// 官方库暂时也放开限制可以随意传 26.5.31
else if (dbProd.product_get_type_text == "1688厂家" && dbProd.add_user_name == "admin" && 1 == 2)
{
var urlAfterSale = BaseClass.BuildObjString("product/wx_get_after_sale");
var dataAfterSale = Work.UserLogin.GetSignaturex();
@@ -3241,8 +3251,15 @@ namespace TemuKJD.WXForms.ProductForms
attrValue = "1 kg";
//else if (attr.value == "g;kg;ml;L")
// attrValue = "100 g";
//else if (attr.value == "cm")
// attrValue = "20 cm";
else if (attr.value == "cm")
{
var propValue = propInfo.values.FirstOrDefault()?.value;
var match = BaseRegex.GetMatchRegexString(ref propValue, @"([\d]{1,4})cm");
if (!string.IsNullOrEmpty(match))
{
attrValue = match + " cm";
}
}
else if (attr.value.Contains("岁以上") && attr.value.Contains("个月以上"))
{
attrValue = "7 岁以上";
@@ -3783,6 +3800,15 @@ namespace TemuKJD.WXForms.ProductForms
}
// 聚水潭上微信小店,加运费(其他平台shipPrice默认为0)
skuParam.productSkuInfo.salePrice += (shipPrice * defaultAddPriceRule.ShippingPriceTimes).ParseToInt();
// 商品裂变随机增加价格
if (BaseClass.UserAuthority.Contains("商品裂变") && chkFissionRandomPriceChange.Checked)
{
Invoke(new Action(() =>
{
var fissionRandomPrice = Randomx.GetId((txtFissionRandomPriceChange.Text.ParseToDecimal() * 100).ParseToInt() + 1);
skuParam.productSkuInfo.salePrice += fissionRandomPrice;
}));
}
// sku图
skuParam.productSkuInfo.thumbImg = upProdParam.product.info.productSaleAttrs[0].items.FirstOrDefault(a => a.value == skuInfo.spec[0].spec_name)?.imgUrl;
if (dbProd.special_prod_type == "爆款数据")
@@ -5072,6 +5098,8 @@ namespace TemuKJD.WXForms.ProductForms
// 爆款数据商品
if (!string.IsNullOrWhiteSpace(cmbHot.Text.Trim()))
data += "&special_prod_type=" + cmbHot.Text.Replace("普通商品", "普通商品,书籍");
else if (BaseClass.SaLevel > 0 || BaseClass.UserAuthority.Contains("爆款数据"))
data += "&special_prod_type=爆款数据,普通商品,书籍";
else
data += "&special_prod_type=普通商品,书籍";
@@ -5512,7 +5540,7 @@ namespace TemuKJD.WXForms.ProductForms
private void cmbGroupFilter_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbGroupFilter.Text == "我的商品" && cmbSourceType.Text != "" && cmbSourceType.Text != "多多商品" && cmbSourceType.Text != "1688商品")
if (cmbGroupFilter.Text == "我的商品" && cmbSourceType.Text != "多多商品" && cmbSourceType.Text != "1688商品")
{
cmbSourceType.Text = "";
}
@@ -5525,7 +5553,7 @@ namespace TemuKJD.WXForms.ProductForms
else
fillWxCate();
if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) && cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家")
if (cmbSourceType.Text != "厂商直采"/* && cmbSourceType.Text != "1688厂家"*/)
{
cmbJstInitSet.Text = "";
}