fix
This commit is contained in:
parent
fef5d33f08
commit
001716785d
|
@ -68,6 +68,9 @@ func (l *GetPriceByPidLogic) GetPriceByPid(req *types.GetPriceByPidReq, userinfo
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, fmt.Sprintf("failed to parse step price,id = %d", priceInfo.Id))
|
return resp.SetStatusWithMessage(basic.CodeServiceErr, fmt.Sprintf("failed to parse step price,id = %d", priceInfo.Id))
|
||||||
}
|
}
|
||||||
|
if len(stepPriceSlice) == 0 || len(stepNumSlice) == 0 {
|
||||||
|
return resp.SetStatusWithMessage(basic.CodeServiceErr, "number of step num or step price is zero")
|
||||||
|
}
|
||||||
lenStepNum := len(stepNumSlice)
|
lenStepNum := len(stepNumSlice)
|
||||||
itemList := make([]types.PriceItem, 0, 10)
|
itemList := make([]types.PriceItem, 0, 10)
|
||||||
for *priceInfo.MinBuyNum < (int64(stepNumSlice[lenStepNum-1]) + 5) {
|
for *priceInfo.MinBuyNum < (int64(stepNumSlice[lenStepNum-1]) + 5) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user