- 调价包改为按SKU的价格来使用(GetPricePercentage)

This commit is contained in:
gazebo
2019-08-02 17:21:13 +08:00
parent 8343061c5f
commit 1d036d919b
8 changed files with 9 additions and 9 deletions

View File

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