This commit is contained in:
laodaming 2023-07-21 17:21:31 +08:00
parent 133af63064
commit 83fc1b30c7

View File

@ -109,19 +109,13 @@ func (l *GetPriceByPidLogic) dealWithStepRange(stepNumSlice, stepPriceSlice []in
}
num := int64(stepNum) * (*priceInfo.EachBoxNum)
rangeNum := types.RangeNum{}
//只有1个
if lenStepNum == 1 {
if numKey < lenStepNum-1 { //前面的
nextNum := int64(stepNumSlice[numKey+1]) * (*priceInfo.EachBoxNum)
rangeNum.Begin = num
rangeNum.End = nextNum - 1
} else { //最后一个
rangeNum.Begin = num
rangeNum.End = 99999999999
} else {
if numKey < lenStepNum-1 { //前面的
nextNum := int64(stepNumSlice[numKey+1]) * (*priceInfo.EachBoxNum)
rangeNum.Begin = num
rangeNum.End = nextNum - 1
} else { //最后一个
rangeNum.Begin = num
rangeNum.End = 99999999999
}
}
stepListRsp = append(stepListRsp, types.StepPrice{
RangeNum: rangeNum,