fix
This commit is contained in:
@@ -138,7 +138,7 @@ func (d *defaultShoppingCart) CaculateStepPrice(purchaseQuantity int64, stepPric
|
|||||||
//购买数量>起点
|
//购买数量>起点
|
||||||
if purchaseQuantity > v.StartQuantity {
|
if purchaseQuantity > v.StartQuantity {
|
||||||
//最后一个 || 小于等于终点
|
//最后一个 || 小于等于终点
|
||||||
if k == l-1 || purchaseQuantity < v.EndQuantity {
|
if k == l-1 || (purchaseQuantity < v.EndQuantity && purchaseQuantity >= v.StartQuantity) {
|
||||||
itemPrice = v.Price + fittingPrice
|
itemPrice = v.Price + fittingPrice
|
||||||
return itemPrice * purchaseQuantity, itemPrice, nil
|
return itemPrice * purchaseQuantity, itemPrice, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user