Integer pageNum = 1;
Integer pageSize = 1000;
//获取数据
PageInfo<RespDto> pageInfo = QueryApi.queryByPage(filter, pageNum, pageSize);
List<tRespDto> list = pageInfo.getList();
long total = pageInfo.getTotal();
if (total > pageSize) {
long l = (total % pageSize == 0) ? total / pageSize : (total / pageSize + 1);
//冗余一个数据跑循环,也可以作为日志打印跑了几次调度
int i = 1;
for (pageNum++; pageNum <= l; i++) {
List<RespDto> list1 = QueryApi.queryByPage(filter, pageNum, pageSize).getList();
list.addAll(list1);
}
}