|
|
@ -164,11 +164,22 @@ namespace BBWY.Server.Business |
|
|
|
if (request.GiftTemplateId == 0 && string.IsNullOrEmpty(request.MainProductGiftSku)) |
|
|
|
throw new BusinessException("赠品模板和主商品赠品SKU至少具备一个"); |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(request.FullTitle)) |
|
|
|
throw new BusinessException("缺少完整标题"); |
|
|
|
if (request.IsNewProduct == null) |
|
|
|
request.IsNewProduct = 1; |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(request.SimpleTitle)) |
|
|
|
throw new BusinessException("缺少精简标题"); |
|
|
|
if (request.IsNewProduct == 1) |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(request.FullTitle)) |
|
|
|
throw new BusinessException("缺少完整标题"); |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(request.SimpleTitle)) |
|
|
|
throw new BusinessException("缺少精简标题"); |
|
|
|
} |
|
|
|
else if (request.IsNewProduct == 0) |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(request.FullTitle)) |
|
|
|
throw new BusinessException("缺少完整标题"); |
|
|
|
} |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(request.ActivityName)) |
|
|
|
throw new BusinessException("缺少任务名称"); |
|
|
@ -234,7 +245,8 @@ namespace BBWY.Server.Business |
|
|
|
SpuPublishTime = spuResponse.Data.Items[0].CreateTime, |
|
|
|
TaskCount = request.TaskCount, |
|
|
|
CustomMotherSku = request.CustomMotherSku, |
|
|
|
OuterId = request.OuterId |
|
|
|
OuterId = request.OuterId, |
|
|
|
IsNewProduct = request.IsNewProduct |
|
|
|
}; |
|
|
|
fsql.Insert(promotionTask).ExecuteAffrows(); |
|
|
|
} |
|
|
@ -679,7 +691,8 @@ namespace BBWY.Server.Business |
|
|
|
JoinSkuCount = joinSkuList.Count(), |
|
|
|
JoinSkuList = joinSkuList, |
|
|
|
PJZSDingDingKey = shop.PJZSDingDingKey, |
|
|
|
PJZSDingDingWebHook = shop.PJZSDingDingWebHook |
|
|
|
PJZSDingDingWebHook = shop.PJZSDingDingWebHook, |
|
|
|
IsNewProduct = promotionTask.IsNewProduct ?? 1 |
|
|
|
}, GetYunDingRequestHeader(), HttpMethod.Post, timeOutSeconds: 500); |
|
|
|
|
|
|
|
var errorBack = new Action<long, string>((id, errorMsg) => |
|
|
|