diff --git a/server/product/internal/logic/getpricebypidlogic.go b/server/product/internal/logic/getpricebypidlogic.go index 44bfe67a..ea18202f 100644 --- a/server/product/internal/logic/getpricebypidlogic.go +++ b/server/product/internal/logic/getpricebypidlogic.go @@ -116,7 +116,12 @@ func (l *GetPriceByPidLogic) dealWithStepRange(stepNumSlice, stepPriceSlice []in end := int64(0) if numKey == 0 { //第一个 begin = *priceInfo.MinBuyNum * (*priceInfo.EachBoxNum) - end = num - 1 + //只有一阶价格 + if lenStepPrice == 1 { + end = -1 + } else { + end = num - 1 + } } else if numKey < lenStepNum-1 { //中间的 nextNum := int64(stepNumSlice[numKey+1]) * (*priceInfo.EachBoxNum) begin = num