This commit is contained in:
jinyu 2016-07-05 09:46:51 +08:00
parent 49eeace7f5
commit c3795c02b7

View File

@ -215,11 +215,11 @@ public class UserApi extends MpApi {
Following f = null; Following f = null;
for (;;) { for (;;) {
f = getFollowing(nextOpenId); f = getFollowing(nextOpenId);
userList.addAll(f.getUserList());
if (f.getCount() == f.getTotal() || f.getCount() == 0 if (f.getCount() == f.getTotal() || f.getCount() == 0
|| StringUtil.isBlank(f.getNextOpenId())) { || StringUtil.isBlank(f.getNextOpenId())) {
break; break;
} }
userList.addAll(f.getUserList());
nextOpenId = f.getNextOpenId(); nextOpenId = f.getNextOpenId();
} }
return userList; return userList;
@ -245,11 +245,11 @@ public class UserApi extends MpApi {
Following f = null; Following f = null;
for (;;) { for (;;) {
f = getFollowingOpenIds(nextOpenId); f = getFollowingOpenIds(nextOpenId);
openIds.addAll(f.getOpenIds());
if (f.getCount() == f.getTotal() || f.getCount() == 0 if (f.getCount() == f.getTotal() || f.getCount() == 0
|| StringUtil.isBlank(f.getNextOpenId())) { || StringUtil.isBlank(f.getNextOpenId())) {
break; break;
} }
openIds.addAll(f.getOpenIds());
nextOpenId = f.getNextOpenId(); nextOpenId = f.getNextOpenId();
} }
return openIds; return openIds;