This commit is contained in:
laodaming 2023-08-10 10:19:37 +08:00
parent 5470f22e77
commit 104a9db7ea

View File

@ -116,7 +116,12 @@ func (l *GetPriceByPidLogic) dealWithStepRange(stepNumSlice, stepPriceSlice []in
end := int64(0)
if numKey == 0 { //第一个
begin = *priceInfo.MinBuyNum * (*priceInfo.EachBoxNum)
//只有一阶价格
if lenStepPrice == 1 {
end = -1
} else {
end = num - 1
}
} else if numKey < lenStepNum-1 { //中间的
nextNum := int64(stepNumSlice[numKey+1]) * (*priceInfo.EachBoxNum)
begin = num