- GetPricePercentage要求的是unitPrice

This commit is contained in:
gazebo
2019-07-18 10:33:13 +08:00
parent b1216abbfb
commit bfca6b73a4
8 changed files with 10 additions and 9 deletions

View File

@@ -243,13 +243,13 @@ func CaculateSkuPriceFromVendor(vendorPrice, percentage, catPercentage int) int
return price
}
func GetPricePercentage(l model.PricePercentagePack, price int, defPricePercentage int) (pricePercentage int) {
func GetPricePercentage(l model.PricePercentagePack, unitPrice int, defPricePercentage int) (pricePercentage int) {
pricePercentage = defPricePercentage
if len(l) > 0 {
var lastItem *model.PricePercentageItem
for _, v := range l {
lastItem = v
if v.BeginPrice > price {
if v.BeginPrice > unitPrice {
break
}
}