diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 016b0e7a5..b1975d5eb 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -424,6 +424,8 @@ func getActRule(vendorID, actType int) (actRule *tActRuleInfo, err error) { func checkDiscountValidation(vendorIDs []int, actType int, pricePercentage float64) (err error) { pricePercentageMin := int(math.Floor(pricePercentage)) pricePercentageMax := int(math.Ceil(pricePercentage)) + fmt.Println(pricePercentageMin, pricePercentageMax, pricePercentage) + errList := errlist.New() for _, vendorID := range vendorIDs { actRule, err2 := getActRule(vendorID, actType) @@ -431,7 +433,6 @@ func checkDiscountValidation(vendorIDs []int, actType int, pricePercentage float if pricePercentageMin < actRule.MinDiscount { errList.AddErr(fmt.Errorf("%s%s活动折扣必须大于:%d", model.VendorChineseNames[vendorID], model.ActTypeName[actType], actRule.MinDiscount)) } else if pricePercentageMax > actRule.MaxDiscount { - fmt.Println(pricePercentageMax, actRule.MaxDiscount) errList.AddErr(fmt.Errorf("%s%s活动折扣必须小于:%d", model.VendorChineseNames[vendorID], model.ActTypeName[actType], actRule.MaxDiscount)) } } else {