shikeying
2024-01-11 3b67e947e36133e2a40eb2737b15ea375e157ea0
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
package com.walker.common;
 
/**
 * 默认分页组件
 *
 * @author 时克英
 */
@Deprecated
public class DefaultSplitPageInfo extends SplitPageInfo {
 
    private static final long serialVersionUID = -4354826336645108958L;
 
    /**
     * 根据pageSize创建分页组件
     *
     * @param pageSize 每页行数
     */
    public DefaultSplitPageInfo(int pageSize) {
        this.setPageSize(pageSize);
        this.setCurrentPage(1);
        this.setPageRowEnd(pageSize);
        this.setPageRowBegin(0);
    }
 
    /**
     * 指定分页的每页个数和当前查询页
     * @param pageSize 每页记录数
     * @param currentPage 当前页
     */
    public DefaultSplitPageInfo(int pageSize,int currentPage){
        this.setPageSize(pageSize);
        this.setCurrentPage(currentPage);
        if (currentPage > 0) {
            this.setPageRowBegin((currentPage - 1) * pageSize + 1);
        } else {
            this.setPageRowBegin(0);
        }
        this.setPageRowEnd(this.getPageRowBegin() + pageSize-1);
 
 
    }
    /**
     * 默认构造函数
     */
    public DefaultSplitPageInfo() {
        super();
    }
 
    @Override
    public String getPaginateHtml() {
        return null;
    }
 
}