- promotion/CreatePromotion支持创建京西与京东活动

This commit is contained in:
gazebo
2019-06-19 13:52:13 +08:00
parent 90b29132c0
commit 840406aad4
2 changed files with 3 additions and 9 deletions

View File

@@ -233,12 +233,12 @@ func Init() {
}
func CreateJdPromotion(ctx *jxcontext.Context, vendorID int, isIDJd bool, isAsync, isContinueWhenError bool, vendorPromotionID string, params *PromotionParams, mapData map[string]interface{}) (hint string, err error) {
if vendorPromotionID != "" && len(vendorPromotionID) != len("14863853") {
return "", fmt.Errorf("%s看起来不像是一个有效的京东活动ID请仔细检查一下", vendorPromotionID)
}
if vendorID != model.VendorIDJD && vendorID != model.VendorIDJX {
return "", fmt.Errorf("当前只支持京西与京东活动")
}
if vendorPromotionID != "" && len(vendorPromotionID) != len("14863853") {
return "", fmt.Errorf("%s看起来不像是一个有效的京东活动ID请仔细检查一下", vendorPromotionID)
}
if len(params.SkuPrices) == 0 {
return "", ErrEmptySkus
}