Commit 917deb66 by jinxin

会员标签同步

parent 55694e25
......@@ -806,6 +806,11 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
String wxEnterpriseId = dto.getWxEnterpriseId();
String enterpriseId = dto.getEnterpriseId();
Integer totalCount = tabHaobanExternalClerkRelatedMapper.countByEnterpriseIdAndWxEnterpriseId(wxEnterpriseId, enterpriseId);
if(0 == totalCount){
dto.setTotalCount(0);
return;
}
dto.setTotalCount(totalCount);
Integer round = size / totalCount + 1;
List<String> result = new LinkedList<>();
// 程序计数器
......@@ -820,7 +825,8 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
@Override
public void run() {
List<String> memberIdList = tabHaobanExternalClerkRelatedMapper.getMemberIdList(wxEnterpriseId, enterpriseId, startLen, size);
result.addAll(memberIdList);
dto.setMemberIds(memberIdList);
qywxTagSyncApiService.tagSync(dto);
// 计数器 -1(唤醒阻塞线程)
count.countDown();
}
......@@ -836,8 +842,5 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
// 启动一次顺序关闭,执行以前提交的任务,但不接受新任务。若已经关闭,则调用没有其他作用。
executor.shutdown();
}
dto.setMemberIds(result);
qywxTagSyncApiService.tagSync(dto);
}
}
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