|
@ -81,8 +81,8 @@ namespace BBWY.Server.Business |
|
|
if (string.IsNullOrEmpty(request.MainProductSpu)) |
|
|
if (string.IsNullOrEmpty(request.MainProductSpu)) |
|
|
throw new BusinessException("缺少主商品SPU"); |
|
|
throw new BusinessException("缺少主商品SPU"); |
|
|
|
|
|
|
|
|
if (request.MotherTemplateId == 0 && string.IsNullOrEmpty(request.MainProductSku)) |
|
|
if (request.MotherTemplateId == 0 && string.IsNullOrEmpty(request.MainProductSku) && string.IsNullOrEmpty(request.CustomMotherSku)) |
|
|
throw new BusinessException("奶妈模板和主商品SKU至少具备一个"); |
|
|
throw new BusinessException("奶妈模板,奶妈自定义SKU,主商品SKU至少具备一个"); |
|
|
|
|
|
|
|
|
if (request.GiftTemplateId == 0 && string.IsNullOrEmpty(request.MainProductGiftSku)) |
|
|
if (request.GiftTemplateId == 0 && string.IsNullOrEmpty(request.MainProductGiftSku)) |
|
|
throw new BusinessException("赠品模板和主商品赠品SKU至少具备一个"); |
|
|
throw new BusinessException("赠品模板和主商品赠品SKU至少具备一个"); |
|
@ -96,6 +96,9 @@ namespace BBWY.Server.Business |
|
|
if (request.ActivityName.Length > 10) |
|
|
if (request.ActivityName.Length > 10) |
|
|
throw new BusinessException("活动名称不能超过10个字"); |
|
|
throw new BusinessException("活动名称不能超过10个字"); |
|
|
|
|
|
|
|
|
|
|
|
if (request.TaskCount == 0) |
|
|
|
|
|
throw new BusinessException("任务量不能为0"); |
|
|
|
|
|
|
|
|
if (request.Id == 0) |
|
|
if (request.Id == 0) |
|
|
{ |
|
|
{ |
|
|
var relayAPIHost = GetPlatformRelayAPIHost(Enums.Platform.京东); |
|
|
var relayAPIHost = GetPlatformRelayAPIHost(Enums.Platform.京东); |
|
@ -149,7 +152,17 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
|
request.Map(dbPromotionTask); |
|
|
request.Map(dbPromotionTask); |
|
|
fsql.Update<PromotionTask>().SetSource(dbPromotionTask) |
|
|
fsql.Update<PromotionTask>().SetSource(dbPromotionTask) |
|
|
.IgnoreColumns(new string[] { "UpdateSortTime", "Sort", "Status", "CreateTime", "SpuLogo", "SpuPublishTime", "StartTime", "EndTime" }) |
|
|
.IgnoreColumns(new string[] |
|
|
|
|
|
{ |
|
|
|
|
|
"UpdateSortTime", |
|
|
|
|
|
"Sort", "Status", |
|
|
|
|
|
"CreateTime", |
|
|
|
|
|
"SpuLogo", |
|
|
|
|
|
"SpuPublishTime", |
|
|
|
|
|
"StartTime", |
|
|
|
|
|
"EndTime", |
|
|
|
|
|
"CompletedTaskCount" |
|
|
|
|
|
}) |
|
|
.ExecuteAffrows(); |
|
|
.ExecuteAffrows(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -247,6 +260,7 @@ namespace BBWY.Server.Business |
|
|
MainProductGiftSku = dbPromotionTask.MainProductGiftSku, |
|
|
MainProductGiftSku = dbPromotionTask.MainProductGiftSku, |
|
|
MainProductSku = dbPromotionTask.MainProductSku, |
|
|
MainProductSku = dbPromotionTask.MainProductSku, |
|
|
MotherTemplateSku = motherTemplateSku, |
|
|
MotherTemplateSku = motherTemplateSku, |
|
|
|
|
|
CustomMotherSku = dbPromotionTask.CustomMotherSku, |
|
|
MainProductSpu = dbPromotionTask.MainProductSpu, |
|
|
MainProductSpu = dbPromotionTask.MainProductSpu, |
|
|
Platform = Enums.Platform.京东, |
|
|
Platform = Enums.Platform.京东, |
|
|
ShopId = dbPromotionTask.ShopId.Value |
|
|
ShopId = dbPromotionTask.ShopId.Value |
|
|