by Robin at 20240520

This commit is contained in:
Leufolium 2024-05-20 17:32:12 +08:00
parent b1b95821e1
commit d1b1a62b8a
1 changed files with 3 additions and 0 deletions

View File

@ -1191,6 +1191,9 @@ func (s *Service) utilGetStreamerRecommListVO(ctx *gin.Context, recommlist []int
// 向下操作,去尾 // 向下操作,去尾
upperBound := int64(consts.StreamerRecommThroughput) upperBound := int64(consts.StreamerRecommThroughput)
if len(recommlist) < consts.StreamerRecommThroughput {
upperBound = int64(len(recommlist))
}
if opType == consts.Recomm_Down { if opType == consts.Recomm_Down {
surplusVolume := recommListLength - offset surplusVolume := recommListLength - offset
if surplusVolume < consts.StreamerRecommThroughput { if surplusVolume < consts.StreamerRecommThroughput {