From 32bc876113b76d569e64e367f4178a0e427d8429 Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 10 Jul 2019 11:05:30 +0800 Subject: [PATCH] - fix bug in checkActValidation --- 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 9c68a2e6b..48f5eb05d 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -254,10 +254,10 @@ func checkActValidation(act *model.Act, vendorIDs []int) (err error) { if act.PricePercentage == 0 { errList = append(errList, fmt.Errorf("活动必须指定价格折扣")) } - if act.Type == model.ActSkuDirectDown && act.PricePercentage <= minDiscount4SkuDirectDown || act.PricePercentage >= 100 { + if act.Type == model.ActSkuDirectDown && (act.PricePercentage <= minDiscount4SkuDirectDown || act.PricePercentage >= 100) { errList = append(errList, fmt.Errorf("%s活动折扣必须大于:%d, 且必须有折扣", model.ActTypeName[act.Type], minDiscount4SkuDirectDown)) } - if act.Type == model.ActSkuSecKill && act.PricePercentage >= maxDiscount4SkuSecKill { + if act.Type == model.ActSkuSecKill && (act.PricePercentage >= maxDiscount4SkuSecKill) { if vendorIDMap[model.VendorIDMTWM] == 1 { errList = append(errList, fmt.Errorf("平台%s暂不支持%s活动", model.VendorChineseNames[model.VendorIDMTWM], model.ActTypeName[act.Type])) }