1
hao
2025-05-20 8e24c6fea30d9b179375ee2893710cdec2443b13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package com.app.base.data;
 
import java.io.Serializable;
import java.util.List;
 
public class DataGrid implements Serializable {
    private static final long serialVersionUID = -8747473618280525378L;
 
    /**
     * 返回数据
     */
    protected List rows;
    /**
     * 页码
     */
    protected int page;
    /**
     * 每页大小
     */
    protected int pageSize;
    /**
     * 总数
     */
    protected int total;
 
    public DataGrid() {
    }
 
    public DataGrid(List rows, int total, int page, int pageSize) {
        this.rows = rows;
        this.total = total;
        this.page = page;
        this.pageSize = pageSize;
    }
 
    public DataGrid(List rows, int total) {
        this.rows = rows;
        this.total = total;
    }
 
    public static DataGrid create() {
        return new DataGrid();
    }
 
    public static DataGrid create(List rows, int total) {
        return create(rows, total, 0, 0);
    }
 
    public static DataGrid create(List rows, int total, int page, int pageSize) {
        return new DataGrid(rows, total, page, pageSize);
    }
 
    public List getRows() {
        return rows;
    }
 
    public void setRows(List rows) {
        this.rows = rows;
    }
 
    public int getPage() {
        return page;
    }
 
    public void setPage(int page) {
        this.page = page;
    }
 
    public int getPageSize() {
        return pageSize;
    }
 
    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
 
    public int getTotal() {
        return total;
    }
 
    public void setTotal(int total) {
        this.total = total;
    }
}