分页获取10000条数据
int currentPage = 1;
int pageSize = 1000;
int total = 10;
List<TScmVatNotDeduct> data = new ArrayList<TScmVatNotDeduct>();
// results 最终的查询结果
List<TScmVatNotDeduct> results = new ArrayList<TScmVatNotDeduct>();
while (total>0) {
data = null;
Page<TScmVatNotDeduct> page = PageHelper.startPage(currentPage, pageSize);
List<TScmVatNotDeduct> confirmNotDeductList = notDeductMapper.confirmNotDeductList(request);
data = page.getResult();
if (data.size() < pageSize) {
data = page.getResult();
results.addAll(data);
total = -1;
break;
}
results.addAll(data);
currentPage++;
total--;
}