List<List<String>> batchList = new ArrayList<>();
if(!CollectionUtils.isEmpty(ids)){
int batchSize = 500;
int totalSize = ids.size();
int batchCount = (totalSize + batchSize - 1)/batchSize;
for(int i = 0; i < batchCount; i++){
int fromIndex = i * batchSize;
int toIndex = Math.min(fromIndex + batchSize,totalSize);
List<String> batchDataList = ids.subList(fromIndex, toIndex);
batchList.add(batchDataList);
}
}
09-23
1876

12-18
11-09
2400

04-26
1167

09-16
810
