This commit is contained in:
laodaming 2023-07-21 17:27:31 +08:00
parent fef5d33f08
commit 001716785d

View File

@ -68,6 +68,9 @@ func (l *GetPriceByPidLogic) GetPriceByPid(req *types.GetPriceByPidReq, userinfo
if err != nil {
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)
itemList := make([]types.PriceItem, 0, 10)
for *priceInfo.MinBuyNum < (int64(stepNumSlice[lenStepNum-1]) + 5) {