- check vendorPromotionID in CreateJdPromotion

This commit is contained in:
gazebo
2018-11-07 14:47:09 +08:00
parent 741a55f7a2
commit e5510db6ea

View File

@@ -199,6 +199,9 @@ func Init() {
}
func CreateJdPromotion(ctx *jxcontext.Context, isIDJd bool, isAsync, isContinueWhenError bool, vendorPromotionID string, params *PromotionParams, userName string) (hint string, err error) {
if vendorPromotionID != "" && len(vendorPromotionID) != len("14863853") {
return "", fmt.Errorf("%s看起来不像是一个有效的京东活动ID请仔细检查一下", vendorPromotionID)
}
if len(params.SkuPrices) == 0 {
return "", ErrEmptySkus
}