好友 null 判断
parent
11fb5eb275
commit
ca7c565f2f
|
@ -78,6 +78,9 @@ public class FriendLogic {
|
|||
List<CommonProto.Friend> friendList = new CopyOnWriteArrayList<>();
|
||||
for (Integer friendId :friends){
|
||||
CommonProto.Friend friend = CBean2Proto.getFriendInfo(friendId,friendManager);
|
||||
if (friend == null) {
|
||||
continue;
|
||||
}
|
||||
friendList.add(friend);
|
||||
}
|
||||
PlayerInfoProto.GetFriendInfoResponse getFriendInfoResponse = PlayerInfoProto.GetFriendInfoResponse
|
||||
|
@ -97,6 +100,9 @@ public class FriendLogic {
|
|||
List<CommonProto.Friend> friendList = new CopyOnWriteArrayList<>();
|
||||
for (Integer friendId :blackFriends){
|
||||
CommonProto.Friend friend = CBean2Proto.getFriendInfo(friendId,friendManager);
|
||||
if (friend == null) {
|
||||
continue;
|
||||
}
|
||||
friendList.add(friend);
|
||||
}
|
||||
PlayerInfoProto.GetFriendInfoResponse getFriendInfoResponse = PlayerInfoProto.GetFriendInfoResponse
|
||||
|
@ -172,6 +178,9 @@ public class FriendLogic {
|
|||
|
||||
for (Integer commondUid : recommandFriends){
|
||||
CommonProto.Friend friend = CBean2Proto.getFriendInfo(commondUid,friendManager);
|
||||
if (friend == null) {
|
||||
continue;
|
||||
}
|
||||
friendList.add(friend);
|
||||
}
|
||||
PlayerInfoProto.GetFriendInfoResponse getFriendInfoResponse = PlayerInfoProto.GetFriendInfoResponse
|
||||
|
@ -212,6 +221,9 @@ public class FriendLogic {
|
|||
List<CommonProto.Friend> friendList = new CopyOnWriteArrayList<>();
|
||||
for (Integer applyFriendId :applyFriends){
|
||||
CommonProto.Friend friend = CBean2Proto.getFriendInfo(applyFriendId,friendManager);
|
||||
if (friend == null) {
|
||||
continue;
|
||||
}
|
||||
friendList.add(friend);
|
||||
}
|
||||
PlayerInfoProto.GetFriendInfoResponse getFriendInfoResponse = PlayerInfoProto.GetFriendInfoResponse
|
||||
|
|
|
@ -811,6 +811,9 @@ public class CBean2Proto {
|
|||
|
||||
public static CommonProto.Friend getFriendInfo(int friendId, FriendManager friendManager) throws Exception {
|
||||
User user = UserManager.getUser(friendId);
|
||||
if (user == null) {
|
||||
return null;
|
||||
}
|
||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||
int isGrive = 0;
|
||||
int haveReward = 0;
|
||||
|
|
Loading…
Reference in New Issue