pagehelper对处理后的list进行分页
List results = userService.selectLatestData(deviceAdd);
int pageSize = 10;
Integer pageIndex = deviceAdd.getPageIndex();
Page page = new Page(pageIndex, pageSize);
int total = results.size();
page.setTotal(total);
int startIndex = (pageIndex - 1) * pageSize;
int endIndex = Math.min((startIndex + pageSize), total);
page.addAll(results.subList(startIndex, endIndex));
PageInfo pageInfo = new PageInfo(page);
return new ResponseVo<>(ResponseType.RegisterSuccess.getStatus(), "success", pageInfo);