xuhy
2023-08-11 b659987d3e120cea0b94fdb01f1ab06260f61825
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
package com.stylefeng.guns.core.page;
 
/**
 * 分页参数类(for BootStrap Table)
 *
 * @author fengshuonan
 * @date 2017年1月21日 下午2:21:35
 */
public class PageBT {
 
    private int limit;          // 每页显示个数
 
    private int offset;         // 查询的偏移量(查询的页数 = offset/limit + 1)
 
    private String order;       // 排序方式
 
 
    public PageBT() {
        super();
    }
 
    public PageBT(int limit, int offset) {
        super();
        this.limit = limit;
        this.offset = offset;
    }
 
    public int getLimit() {
        return limit;
    }
 
    public void setLimit(int limit) {
        this.limit = limit;
    }
 
    public int getOffset() {
        return offset;
    }
 
    public void setOffset(int offset) {
        this.offset = offset;
    }
 
    public String getOrder() {
        return order;
    }
 
    public void setOrder(String order) {
        this.order = order;
    }
 
    public int getPageSize() {
        return this.limit;
    }
 
    public int getPageNumber() {
        return this.offset / this.limit + 1;
    }
 
    @Override
    public String toString() {
        return "PageBT [limit=" + limit + ", offset=" + offset + ", order=" + order + "]";
    }
 
}