Browse Source

优先取颜色

AddValidOverTime
shanji 2 years ago
parent
commit
ae059efe36
  1. 6
      BBWY.Server.Business/PlatformSDK/JDBusiness.cs

6
BBWY.Server.Business/PlatformSDK/JDBusiness.cs

@ -971,7 +971,11 @@ namespace BBWY.Server.Business
nLogManager.Default().Info($"获取销售属性 任务Id {request.Id} 返回内容 {response.Body} 模板sku数量 {request.GiftTemplateSkuList.Count()}");
var colorProperty = response.Json["jingdong_category_read_findAttrsByCategoryIdUnlimitCate_responce"]["findattrsbycategoryidunlimitcate_result"].FirstOrDefault(j => j.Value<string>("name") == "颜色" || (j["attrValueList"] != null && j["attrValueList"].Count() > 0));
var colorProperty = response.Json["jingdong_category_read_findAttrsByCategoryIdUnlimitCate_responce"]["findattrsbycategoryidunlimitcate_result"].FirstOrDefault(j => j.Value<string>("name") == "颜色");
if (colorProperty == null)
{
colorProperty = response.Json["jingdong_category_read_findAttrsByCategoryIdUnlimitCate_responce"]["findattrsbycategoryidunlimitcate_result"].FirstOrDefault(j => j["attrValueList"] != null && j["attrValueList"].Count() > 0);
}
if (colorProperty == null)
{
RollBackWhenStartPromotionError(request.AppKey, request.AppSecret, request.AppToken, giftSkuIdList, request.MainProductSpu, request.FullTitle, brandName, haveGiftTemplateSku);

Loading…
Cancel
Save