- 调价包改为按SKU的价格来使用(GetPricePercentage)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user