PageParam.java 769 Bytes
Newer Older
wangyuanfeng committed
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
package com.itfuture.chainservice.common.utils.page;
/**
 * @author naihe
 * @date 2019/1/14 8:54 AM
 * @desc 分页请求参数封装
 */
public class PageParam {

    public static final int PAGE_SIZE = 10;

    public PageParam() {
        this.c = PAGE_SIZE;
    }

    public PageParam(Integer p, Integer c) {
        this.setP(p);
        this.setC(c);
    }

    //当前页
    private Integer p = 1;

    //每页容量
    private Integer c;

    public Integer getP() {
        return p;
    }

    public void setP(Integer p) {
        if (p != null && p > 0) {
            this.p = p;
        }
    }

    public Integer getC() {
        return c;
    }

    public void setC(Integer c) {
        if (c != null) {
            this.c = c;
        }
    }
}