https://blog.csdn.net/onepersontz/article/details/50034501
https://www.cnblogs.com/ahang/p/5644535.html
https://blog.csdn.net/liutong123987/article/details/79404132
//项目编号
String projectid = request.getParameter("projectid");
//设备编号
String deveui = request.getParameter("deveui");
DevQueryPara para = new DevQueryPara();
para.setProjectid(projectid);
int batch = 500;
para.setBatch(batch);
//总条数
int count = devService.countOsmDev(deveui);
//总页数
double tp = count / (double)batch;
int totalPage = (int) Math.ceil(tp);
//int offset = (totalPage-1) * batch;
List<OsmDev> osmDevList = null;
for (int i=1;i<=totalPage;i++ ) {
int offset = (i-1) * batch;
para.setOffset(offset);
osmDevList = devService.queryAllOsmDevByPara(para);
}