修复食品上货报错
This commit is contained in:
1 parent
0949b8415c
commit
059ac932a0
1 file changed
+14
-5
@@ -3906,7 +3906,7 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
if (upProdParam.product.info.category.FirstOrDefault()?.name == "食品饮料" || prodInfo.detail.cats.FirstOrDefault() == "食品饮料")
|
||||
{
|
||||
if (propInfo.name == "厂名")
|
||||
if (propInfo.name == "厂名" && !prodInfo.property.goods_properties.Any(p => p.name == "生产企业名称"))
|
||||
attr = productAttr.attr.FirstOrDefault(r => r.name == "生产企业名称");
|
||||
else if (propInfo.name == "食品生产许可证编号")
|
||||
attr = productAttr.attr.FirstOrDefault(r => r.name == "食品生产许可证编号");
|
||||
@@ -4505,6 +4505,15 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var param in upProdParam.product.info.param.ToList())
|
||||
{
|
||||
var nameExistParams = upProdParam.product.info.param.Where(c => c.categorys?.FirstOrDefault()?.name == param.categorys?.FirstOrDefault()?.name).ToList();
|
||||
for (int i = 0; i < 10 && nameExistParams.Count > 1; i++)
|
||||
{
|
||||
upProdParam.product.info.param.Remove(nameExistParams.LastOrDefault());
|
||||
nameExistParams = upProdParam.product.info.param.Where(c => c.categorys?.FirstOrDefault()?.name == param.categorys?.FirstOrDefault()?.name).ToList();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region sku规格属性
|
||||
@@ -7626,10 +7635,10 @@ namespace TemuKJD.WXForms.ProductForms
|
||||
|
||||
void SaveImageCacheOld(string spuId, Dictionary<string, string> wxImgMapOldDic)
|
||||
{
|
||||
if (EnvironmentHelper.IsProduction)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//if (EnvironmentHelper.IsProduction)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
|
||||
var url = BaseClass.BuildObjString("product/mdy_pdd_product");
|
||||
var data = "";
|
||||
|
||||
Reference in new issue
Block a user