Browse Source

上架赠品记录返回值

AddValidOverTime
sanji 2 years ago
parent
commit
02f1567127
  1. 2
      BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs
  2. 6
      BBWY.Server.Business/PlatformSDK/JDBusiness.cs

2
BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs

@ -610,7 +610,7 @@ namespace BBWY.Server.Business
MainProductSkuInStore = mainProductSkuInStore, MainProductSkuInStore = mainProductSkuInStore,
OuterId = dbPromotionTask.OuterId OuterId = dbPromotionTask.OuterId
}, GetYunDingRequestHeader(), HttpMethod.Post, timeOutSeconds: 600); }, GetYunDingRequestHeader(), HttpMethod.Post, timeOutSeconds: 700);
if (httpApiResult.StatusCode != System.Net.HttpStatusCode.OK) if (httpApiResult.StatusCode != System.Net.HttpStatusCode.OK)
throw new BusinessException(httpApiResult.Content); throw new BusinessException(httpApiResult.Content);

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

@ -775,7 +775,7 @@ namespace BBWY.Server.Business
{ {
var jdClient = GetJdClient(appKey, appSecret); var jdClient = GetJdClient(appKey, appSecret);
if (haveGiftTemplateSku && deleteSkuList != null && deleteSkuList.Count() > 0) if (haveGiftTemplateSku && deleteSkuList != null && deleteSkuList.Count() > 0 && !deleteSkuList.Any(s => string.IsNullOrEmpty(s)))
DeleteSkuList(new DeleteSkuListRequest() DeleteSkuList(new DeleteSkuListRequest()
{ {
AppKey = appKey, AppKey = appKey,
@ -1102,6 +1102,10 @@ namespace BBWY.Server.Business
throw new BusinessException($"上架sku失败-{errorMsg}"); throw new BusinessException($"上架sku失败-{errorMsg}");
} }
} }
//记录上架返回值
nLogManager.Default().Info($"任务Id {request.Id} 店铺Id {request.ShopId} 上架赠品返回值 {res.Body}");
stepText = "获取上架skuId"; stepText = "获取上架skuId";
var newSkuIdList = res.Json["jingdong_sku_write_updateSkus_responce"]["skuList"].ToList().Select(x => x.Value<string>("skuId")).ToList(); var newSkuIdList = res.Json["jingdong_sku_write_updateSkus_responce"]["skuList"].ToList().Select(x => x.Value<string>("skuId")).ToList();
giftSkuIdList.AddRange(newSkuIdList); giftSkuIdList.AddRange(newSkuIdList);

Loading…
Cancel
Save