fix
This commit is contained in:
parent
985fc93d00
commit
b36ad4bd25
|
@ -87,11 +87,17 @@ func (l *GetPriceByPidLogic) GetPriceByPid(req *types.GetPriceByPidReq, userinfo
|
||||||
tmpPrice = float64(stepPriceSlice[numKey]) / 100
|
tmpPrice = float64(stepPriceSlice[numKey]) / 100
|
||||||
}
|
}
|
||||||
num := int64(stepNum) * (*priceInfo.EachBoxNum)
|
num := int64(stepNum) * (*priceInfo.EachBoxNum)
|
||||||
rangeNum := fmt.Sprintf("%dPCS", num)
|
rangeNum := ""
|
||||||
//不是最后一个
|
if numKey < lenStepNum-1 { //前面的
|
||||||
if numKey < lenStepNum-1 {
|
|
||||||
nextNum := int64(stepNumSlice[numKey+1]) * (*priceInfo.EachBoxNum)
|
nextNum := int64(stepNumSlice[numKey+1]) * (*priceInfo.EachBoxNum)
|
||||||
rangeNum = fmt.Sprintf("%d-%dPCS", num, nextNum-1)
|
//第一个
|
||||||
|
if numKey == 0 {
|
||||||
|
rangeNum = fmt.Sprintf("%d-%dPCS", num, nextNum-1)
|
||||||
|
} else {
|
||||||
|
rangeNum = fmt.Sprintf("%d-%dPCS", num, nextNum-1)
|
||||||
|
}
|
||||||
|
} else { //最后一个
|
||||||
|
rangeNum = fmt.Sprintf(">=%dPCS", num)
|
||||||
}
|
}
|
||||||
stepListRsp = append(stepListRsp, types.StepPrice{
|
stepListRsp = append(stepListRsp, types.StepPrice{
|
||||||
Range: rangeNum,
|
Range: rangeNum,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user