package com.sundot.airport.exam.common;

import com.github.pagehelper.PageHelper;

public class BasePageParam {
    /**
     * 当前第几页
     */
    private int pageNum = 1;

    /**
     * 每页的数量
     */
    private int pageSize = 10;

    public BasePageParam() {
    }

    public BasePageParam(int pageNum, int pageSize) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    @Override
    public String toString() {
        return "BasePageParam{" + "pageNum=" + pageNum + ", pageSize=" + pageSize + '}';
    }

    /**
     * <b>方法名: </b> initPageInfo <br>
     * <b>说明: </b>初始化分页数据  <br>
     *
     * <b>修改履历: </b>
     * @author 2021/6/16 xuxiongzi
     */
    public void initPageInfo(){
        PageHelper.startPage(pageNum, pageSize);
    }
}
