- 修复GetPricePercentage的BUG
This commit is contained in:
@@ -248,10 +248,10 @@ func GetPricePercentage(l model.PricePercentagePack, unitPrice int, defPricePerc
|
||||
if len(l) > 0 {
|
||||
var lastItem *model.PricePercentageItem
|
||||
for _, v := range l {
|
||||
lastItem = v
|
||||
if v.BeginPrice > unitPrice {
|
||||
break
|
||||
}
|
||||
lastItem = v
|
||||
}
|
||||
if lastItem != nil {
|
||||
pricePercentage = lastItem.PricePercentage
|
||||
@@ -265,10 +265,10 @@ func GetPricePercentageByVendorPrice(l model.PricePercentagePack, vendorPrice in
|
||||
if len(l) > 0 {
|
||||
var lastItem *model.PricePercentageItem
|
||||
for _, v := range l {
|
||||
lastItem = v
|
||||
if CaculateSkuVendorPrice(v.BeginPrice, v.PricePercentage, 0) > vendorPrice {
|
||||
break
|
||||
}
|
||||
lastItem = v
|
||||
}
|
||||
if lastItem != nil {
|
||||
pricePercentage = lastItem.PricePercentage
|
||||
|
||||
Reference in New Issue
Block a user