From 81d0858aadf6a470d4d3c1cb61ac47eae62a0139 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Fri, 8 Mar 2024 15:21:52 +0800 Subject: [PATCH 1/2] by --- app/mix/service/utilservice.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/mix/service/utilservice.go b/app/mix/service/utilservice.go index 099d01ce..b7af11b9 100644 --- a/app/mix/service/utilservice.go +++ b/app/mix/service/utilservice.go @@ -833,6 +833,10 @@ func (s *Service) utilGetStreamerRecommListVO(ctx *gin.Context, recommlist []int return make([]*streamerproto.ApiListExtVO, 0), nil } + if consts.StreamerRecommThroughput > recommListLength { + upperBound = consts.StreamerRecommThroughput + } + // 根据用户游标查询得到结果 midList := make([]int64, 0) for i := 0; i < upperBound; i++ { From 5f253ab9d33de63c30fadf876de98180423eea70 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Fri, 8 Mar 2024 15:22:33 +0800 Subject: [PATCH 2/2] fix --- app/mix/service/utilservice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mix/service/utilservice.go b/app/mix/service/utilservice.go index b7af11b9..71ea6572 100644 --- a/app/mix/service/utilservice.go +++ b/app/mix/service/utilservice.go @@ -833,7 +833,7 @@ func (s *Service) utilGetStreamerRecommListVO(ctx *gin.Context, recommlist []int return make([]*streamerproto.ApiListExtVO, 0), nil } - if consts.StreamerRecommThroughput > recommListLength { + if consts.StreamerRecommThroughput < recommListLength { upperBound = consts.StreamerRecommThroughput }