by Robin at 20240315
This commit is contained in:
parent
a10ce673ec
commit
5ccad2cbca
|
@ -828,7 +828,6 @@ func (s *Service) utilGetStreamerRecommListVO(ctx *gin.Context, recommlist []int
|
|||
// 获取用户游标
|
||||
offset := int64(0)
|
||||
recommListLength := int64(len(recommlist))
|
||||
upperBound := int64(consts.StreamerRecommThroughput)
|
||||
|
||||
offset, bottomFlag, err := s.utilGetStreamerRecommlistOffsetAndBottomeFlag(ctx, recommListLength, mid, opType)
|
||||
if err != nil {
|
||||
|
@ -839,10 +838,13 @@ func (s *Service) utilGetStreamerRecommListVO(ctx *gin.Context, recommlist []int
|
|||
return make([]*streamerproto.ApiListExtVO, 0), nil
|
||||
}
|
||||
|
||||
surplusVolume := recommListLength - offset
|
||||
|
||||
if surplusVolume < consts.StreamerRecommThroughput {
|
||||
upperBound = surplusVolume
|
||||
// 向下操作,去尾
|
||||
upperBound := int64(consts.StreamerRecommThroughput)
|
||||
if opType == consts.Recomm_Down {
|
||||
surplusVolume := recommListLength - offset
|
||||
if surplusVolume < consts.StreamerRecommThroughput {
|
||||
upperBound = surplusVolume
|
||||
}
|
||||
}
|
||||
|
||||
// 根据用户游标查询得到结果
|
||||
|
@ -1109,7 +1111,6 @@ func (s *Service) utilGetMomentRecommListIds(ctx *gin.Context, mid int64, opType
|
|||
|
||||
// 获取用户游标
|
||||
offset := int64(0)
|
||||
upperBound := throughput
|
||||
|
||||
// 获取游标和是否已触底标志
|
||||
offset, bottomFlag, err := s.utilGetMomentRecommlistOffsetAndBottomeFlag(ctx, mid, opType, recommListLength, throughput)
|
||||
|
@ -1121,10 +1122,13 @@ func (s *Service) utilGetMomentRecommListIds(ctx *gin.Context, mid int64, opType
|
|||
return make([]int64, 0), nil
|
||||
}
|
||||
|
||||
surplusVolume := recommListLength - offset
|
||||
|
||||
if surplusVolume < throughput {
|
||||
upperBound = surplusVolume
|
||||
// 向下操作,去尾
|
||||
upperBound := throughput
|
||||
if opType == consts.Recomm_Down {
|
||||
surplusVolume := recommListLength - offset
|
||||
if surplusVolume < throughput {
|
||||
upperBound = surplusVolume
|
||||
}
|
||||
}
|
||||
|
||||
// 根据用户游标得到待查询ids
|
||||
|
|
Loading…
Reference in New Issue