|
@ -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, |
|
@ -852,7 +852,7 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
|
public override StartPromotionTaskResponse StartJDPromotionTask(StartPromotionTaskRequest2 request) |
|
|
public override StartPromotionTaskResponse StartJDPromotionTask(StartPromotionTaskRequest2 request) |
|
|
{ |
|
|
{ |
|
|
var stepText = string.Empty; |
|
|
var stepText = string.Empty; |
|
|
List<string> giftSkuIdList = new List<string>(); |
|
|
List<string> giftSkuIdList = new List<string>(); |
|
|
var brandName = string.Empty; |
|
|
var brandName = string.Empty; |
|
|
var haveGiftTemplateSku = request.GiftTemplateSkuList != null && request.GiftTemplateSkuList.Count() > 0; |
|
|
var haveGiftTemplateSku = request.GiftTemplateSkuList != null && request.GiftTemplateSkuList.Count() > 0; |
|
@ -861,7 +861,7 @@ namespace BBWY.Server.Business |
|
|
var jdClient = GetJdClient(request.AppKey, request.AppSecret); |
|
|
var jdClient = GetJdClient(request.AppKey, request.AppSecret); |
|
|
long wareId = long.Parse(request.MainProductSpu); |
|
|
long wareId = long.Parse(request.MainProductSpu); |
|
|
long promotionId = 0; |
|
|
long promotionId = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 前置检查各项sku
|
|
|
#region 前置检查各项sku
|
|
|
var searchProductSkuRequest = new SearchProductSkuRequest() |
|
|
var searchProductSkuRequest = new SearchProductSkuRequest() |
|
@ -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); |
|
|