Commit b1c664c1 authored by 李健华's avatar 李健华

循环调用方法修改为while方式

parent 792d159c
......@@ -95,9 +95,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService {
// 公众号类型
private final String WECHAT_XYQB = "xyqb";
private List<String> unionIdList;
// 游标值
private String cursorValue = "";
@PostConstruct
......@@ -111,7 +109,6 @@ public class WechatFollowServiceImpl implements IWechatFollowService {
departmentUserListUrl = "https://qyapi.weixin.qq.com/cgi-bin/user/simplelist?access_token=%s&department_id=%s&fetch_child=1";
//批量获取客户详情
customerInfoListBatchUrl = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/batch/get_by_user?access_token=%s";
unionIdList = new ArrayList<>();
}
......@@ -179,7 +176,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService {
String period = simpleDateFormat.format(new Date());
// 微信公众号关注数据更新
// executeWechatFollowStatus("", period);
executeWechatFollowStatus("", period);
// 企业微信关注数据更新
executeEnterpriseFollowStatus("", period);
}
......@@ -316,11 +313,9 @@ public class WechatFollowServiceImpl implements IWechatFollowService {
// 根据unionid 添加现有指定信息
// 判断nextCursor不为空,继续获取更多客户
log.info("customerListResponse--{}", JSONObject.toJSONString(customerListResponse));
if (!"".equals(customerListResponse.getNextCursor()) && !customerListResponse.getExternal_contact_list().isEmpty()) {
cursorValue = customerListResponse.getNextCursor();
}
}
}
private void initTask() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment