|
|
@ -775,7 +775,7 @@ namespace BBWY.Server.Business |
|
|
|
{ |
|
|
|
var jdClient = GetJdClient(appKey, appSecret); |
|
|
|
|
|
|
|
if (haveGiftTemplateSku) |
|
|
|
if (haveGiftTemplateSku && deleteSkuList != null && deleteSkuList.Count() > 0) |
|
|
|
DeleteSkuList(new DeleteSkuListRequest() |
|
|
|
{ |
|
|
|
AppKey = appKey, |
|
|
@ -852,15 +852,16 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
public override StartPromotionTaskResponse StartJDPromotionTask(StartPromotionTaskRequest2 request) |
|
|
|
{ |
|
|
|
var stepText = string.Empty; |
|
|
|
var stepText = string.Empty; |
|
|
|
List<string> giftSkuIdList = new List<string>(); |
|
|
|
var brandName = string.Empty; |
|
|
|
var haveGiftTemplateSku = request.GiftTemplateSkuList != null && request.GiftTemplateSkuList.Count() > 0; |
|
|
|
try |
|
|
|
{ |
|
|
|
var jdClient = GetJdClient(request.AppKey, request.AppSecret); |
|
|
|
long wareId = long.Parse(request.MainProductSpu); |
|
|
|
List<string> giftSkuIdList = new List<string>(); |
|
|
|
long promotionId = 0; |
|
|
|
var brandName = string.Empty; |
|
|
|
var haveGiftTemplateSku = request.GiftTemplateSkuList != null && request.GiftTemplateSkuList.Count() > 0; |
|
|
|
|
|
|
|
|
|
|
|
#region 前置检查各项sku
|
|
|
|
var searchProductSkuRequest = new SearchProductSkuRequest() |
|
|
@ -1285,6 +1286,7 @@ namespace BBWY.Server.Business |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
nLogManager.Default().Error(ex, $"任务Id {request.Id} 店铺Id {request.ShopId} 执行步骤 {stepText}"); |
|
|
|
RollBackWhenStartPromotionError(request.AppKey, request.AppSecret, request.AppToken, giftSkuIdList, request.MainProductSpu, request.FullTitle, brandName, haveGiftTemplateSku); |
|
|
|
throw ex; |
|
|
|
} |
|
|
|
} |
|
|
|