单个实体类
Integer pageNumber = po.getPageNumber();Integer pageSize = po.getPageSize();Integer last = pageNumber * pageSize;if ((pageNumber * pageSize)>weekResultInfoVOS.size()){last=weekResultInfoVOS.size();}int size = weekResultInfoVOS.size();List<WeekResultInfoVO> weekResultInfoVOS1 = weekResultInfoVOS.subList((pageNumber - 1) * pageSize,last);weekResultInfoVOS=weekResultInfoVOS1;return new ApiResponse<>(weekResultInfoVOS,size);
实体类里面套实体类
List<WeekResultInfoVO> weekResultInfoVOList = weekResultInfoVO.getWeekResultInfoVOList();Integer pageNumber = weekResultPO.getPageNumber();Integer pageSize = weekResultPO.getPageSize();Integer last = pageNumber * pageSize;if ((pageNumber * pageSize)>weekResultInfoVOList.size()){last=weekResultInfoVOList.size();}int size = weekResultInfoVOList.size();List<WeekResultInfoVO> weekResultInfoVOSList1 = weekResultInfoVOList.subList((pageNumber - 1) * pageSize,last);weekResultInfoVO.setWeekResultInfoVOList(weekResultInfoVOSList1);return new ApiResponse<WeekResultInfoVO>(Collections.singleton(weekResultInfoVO),size);