1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| package com.example.common;
|
| import lombok.Data;
|
| import java.util.List;
|
| @Data
| public class PageResult<T> {
|
| private Long total;
| private Long pages;
| private Long current;
| private Long size;
| private List<T> records;
|
| public PageResult(Long total, Long current, Long size, List<T> records) {
| this.total = total;
| this.current = current;
| this.size = size;
| this.records = records;
| this.pages = (total + size - 1) / size;
| }
| }
|
|