Commit 0fcd734b by huangZW

500条分页插入

parent 1f6df762
......@@ -224,12 +224,13 @@ public class QywxGroupSyncOperation implements BaseSyncOperation {
}).collect(Collectors.toList());
//插入不存在的我们pre表的企业微信数据
int count = preDealLogList.size();
int pre = count/1000+1;
int pageSize = 500;
int pre = count/pageSize+1;
int i= 0;
while(i<pre){
i++;
int fromIndex = (i-1)*1000;
int toIndex = (count-fromIndex) > 1000 ? (fromIndex+1000):count;
int fromIndex = (i-1)*pageSize;
int toIndex = (count-fromIndex) > pageSize ? (fromIndex+pageSize):count;
List<TabHaobanPreDealLog>subList = preDealLogList.subList(fromIndex, toIndex);
preDealService.insert(subList);
}
......
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