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

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

parent 792d159c
...@@ -95,9 +95,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService { ...@@ -95,9 +95,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService {
// 公众号类型 // 公众号类型
private final String WECHAT_XYQB = "xyqb"; private final String WECHAT_XYQB = "xyqb";
// 游标值
private List<String> unionIdList;
private String cursorValue = ""; private String cursorValue = "";
@PostConstruct @PostConstruct
...@@ -111,7 +109,6 @@ public class WechatFollowServiceImpl implements IWechatFollowService { ...@@ -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"; 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"; 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 { ...@@ -179,7 +176,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService {
String period = simpleDateFormat.format(new Date()); String period = simpleDateFormat.format(new Date());
// 微信公众号关注数据更新 // 微信公众号关注数据更新
// executeWechatFollowStatus("", period); executeWechatFollowStatus("", period);
// 企业微信关注数据更新 // 企业微信关注数据更新
executeEnterpriseFollowStatus("", period); executeEnterpriseFollowStatus("", period);
} }
...@@ -316,9 +313,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService { ...@@ -316,9 +313,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService {
// 根据unionid 添加现有指定信息 // 根据unionid 添加现有指定信息
// 判断nextCursor不为空,继续获取更多客户 // 判断nextCursor不为空,继续获取更多客户
log.info("customerListResponse--{}", JSONObject.toJSONString(customerListResponse)); log.info("customerListResponse--{}", JSONObject.toJSONString(customerListResponse));
if (!"".equals(customerListResponse.getNextCursor()) && !customerListResponse.getExternal_contact_list().isEmpty()) { cursorValue = customerListResponse.getNextCursor();
cursorValue = customerListResponse.getNextCursor();
}
} }
} }
......
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