好友推荐不查库

main
grimm 2024-08-09 10:14:10 +08:00
parent 623a41164f
commit 2135f1c700
1 changed files with 16 additions and 16 deletions

View File

@ -180,22 +180,22 @@ public class FriendLogic {
Collections.shuffle(recommandFriends);
List<User> cUsers = MongoUtil.getInstence().getRandomUsers(selectSize, uid, playerInfoManager.getLevel());
if (cUsers != null) {
Collections.shuffle(cUsers);
for (User cUser1 : cUsers) {
int recommandId = cUser1.getId();
if (!checkIsAllowRecommandFriend(friendManager, recommandId, recommondIds)) {
continue;
}
recommondIds.add(recommandId);
recommandFriends.add(recommandId);
selectSize--;
if (selectSize <= 0) {
break;
}
}
}
// List<User> cUsers = MongoUtil.getInstence().getRandomUsers(selectSize, uid, playerInfoManager.getLevel());
// if (cUsers != null) {
// Collections.shuffle(cUsers);
// for (User cUser1 : cUsers) {
// int recommandId = cUser1.getId();
// if (!checkIsAllowRecommandFriend(friendManager, recommandId, recommondIds)) {
// continue;
// }
// recommondIds.add(recommandId);
// recommandFriends.add(recommandId);
// selectSize--;
// if (selectSize <= 0) {
// break;
// }
// }
// }
for (Integer commondUid : recommandFriends) {