main
parent
c7eaa22d5d
commit
eef6b9d3bd
|
|
@ -296,19 +296,23 @@ public class AppUserServiceImpl implements IAppUserService {
|
|||
companylList.sort(Comparator.comparingLong(AppUserDataVo::getFansNum).reversed());
|
||||
|
||||
// 好友的好友
|
||||
List<Long> friendIds = appUserFriendMapper.selectByFriendId(ids);
|
||||
entity.setFriendIds(friendIds);
|
||||
entity.setCompanyName(null);
|
||||
List<AppUserDataVo> friendList = appUserMapper.selectList(entity);
|
||||
if (friendList == null || friendList.size() == 0) {
|
||||
List<AppUserDataVo> friendList = null;
|
||||
if (ids == null || ids.size() == 0) {
|
||||
friendList = new ArrayList<>();
|
||||
} else {
|
||||
List<Long> friendIds = appUserFriendMapper.selectByFriendId(ids);
|
||||
entity.setFriendIds(friendIds);
|
||||
entity.setCompanyName(null);
|
||||
friendList = appUserMapper.selectList(entity);
|
||||
if (friendList == null || friendList.size() == 0) {
|
||||
friendList = new ArrayList<>();
|
||||
}
|
||||
Collections.shuffle(friendList);
|
||||
if (friendList.size() > limit) {
|
||||
friendList = friendList.subList(0, limit);
|
||||
}
|
||||
friendList.sort(Comparator.comparingLong(AppUserDataVo::getFansNum).reversed());
|
||||
}
|
||||
Collections.shuffle(friendList);
|
||||
if (friendList.size() > limit) {
|
||||
friendList = friendList.subList(0, limit);
|
||||
}
|
||||
friendList.sort(Comparator.comparingLong(AppUserDataVo::getFansNum).reversed());
|
||||
|
||||
appUserNetVo.setFriendUserList(friendList);
|
||||
appUserNetVo.setSchoolUserList(schoolList);
|
||||
appUserNetVo.setCompanyUserList(companylList);
|
||||
|
|
|
|||
Loading…
Reference in New Issue