From f25beafb9e4fdb4f5b8a64c296907582d3833f7a Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 29 Aug 2019 10:13:36 +0800 Subject: [PATCH] - fk --- business/jxstore/act/act.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index bb9cd29f8..a383e13ba 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -270,9 +270,9 @@ func AddActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, actSto } func checkDiscountValidation(actType int, pricePercentage int) (err error) { - if actType == model.ActSkuDirectDown && (pricePercentage <= minDiscount4SkuDirectDown || pricePercentage >= 100) { + if actType == model.ActSkuDirectDown && (pricePercentage < minDiscount4SkuDirectDown || pricePercentage > 100) { err = fmt.Errorf("%s活动折扣必须大于:%d, 且必须有折扣", model.ActTypeName[actType], minDiscount4SkuDirectDown) - } else if actType == model.ActSkuSecKill && pricePercentage >= maxDiscount4SkuSecKill { + } else if actType == model.ActSkuSecKill && pricePercentage > maxDiscount4SkuSecKill { err = fmt.Errorf("%s活动折扣必须小于:%d", model.ActTypeName[actType], maxDiscount4SkuSecKill) } return err