123
This commit is contained in:
@@ -70,6 +70,7 @@ public class HomeManager {
|
||||
AnchorListQuery query = new AnchorListQuery();
|
||||
// 0-默认查询 1-活跃查询 2-新人查询 3-同城查询
|
||||
query.setType(1);
|
||||
query.setOnlineStatus(1);
|
||||
query.setOpenVideoStatus(1);
|
||||
Page<AnchorListVo> app = anchorService.pageApp(pageQuery, query);
|
||||
List<AnchorListVo> records = app.getRecords();
|
||||
@@ -84,6 +85,7 @@ public class HomeManager {
|
||||
AnchorListQuery query = new AnchorListQuery();
|
||||
// 0-默认查询 1-活跃查询 2-新人查询 3-同城查询
|
||||
query.setType(2);
|
||||
query.setOnlineStatus(1);
|
||||
query.setOpenVideoStatus(1);
|
||||
Page<AnchorListVo> app = anchorService.pageApp(pageQuery, query);
|
||||
List<AnchorListVo> records = app.getRecords();
|
||||
@@ -122,6 +124,8 @@ public class HomeManager {
|
||||
List<AnchorListVo> result = vos.subList(startIndex, endIndex);
|
||||
if(anchorListQueryTypeEnum == AnchorListQueryTypeEnum.DEFAULT && pageNum == 1){
|
||||
List<AnchorListVo> list = getAnchorTopList();
|
||||
Collections.shuffle(list);
|
||||
list = list.subList(0,Math.min(4,list.size()));
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
List<Long> topUserIds = list.stream().map(AnchorListVo::getUserId).collect(Collectors.toList());
|
||||
result = result.stream().filter(anchorListVo -> !topUserIds.contains(anchorListVo.getUserId())).collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user