有效期1
This commit is contained in:
@@ -174,24 +174,28 @@ func (r *Video) GetVideoRankList(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
var videoIds []int64
|
||||
|
||||
for _, video := range videos {
|
||||
videoIds = append(videoIds, video.VideoId)
|
||||
}
|
||||
|
||||
// 处理数据
|
||||
for i, video := range videos {
|
||||
videoIds = append(videoIds, video.VideoId)
|
||||
|
||||
// 判断最后两位票数是否相同
|
||||
if i == 14 {
|
||||
maps = make(map[string]interface{})
|
||||
maps["video_status"] = 1
|
||||
maps["vote_num"] = video.VoteNum
|
||||
results, err := videoDao.GetVideoList(maps)
|
||||
results, err := videoDao.GetVideoListNotIn(maps, videoIds)
|
||||
if err != nil {
|
||||
responses.OkWithData(nil, c)
|
||||
return
|
||||
}
|
||||
|
||||
for _, result := range results {
|
||||
if result.VideoId == video.VideoId {
|
||||
continue
|
||||
}
|
||||
|
||||
videos = append(videos, result)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user