diff --git a/app/mix/service/utilservice.go b/app/mix/service/utilservice.go index 8100fce9..592b45c1 100644 --- a/app/mix/service/utilservice.go +++ b/app/mix/service/utilservice.go @@ -1191,6 +1191,9 @@ func (s *Service) utilGetStreamerRecommListVO(ctx *gin.Context, recommlist []int // 向下操作,去尾 upperBound := int64(consts.StreamerRecommThroughput) + if len(recommlist) < consts.StreamerRecommThroughput { + upperBound = int64(len(recommlist)) + } if opType == consts.Recomm_Down { surplusVolume := recommListLength - offset if surplusVolume < consts.StreamerRecommThroughput {