package com.cxyxiaomo.epp.PageTable.query;

import lombok.Getter;

@Getter
public class PageQuery {

    private int pageIndex = 1; // 第几页
    private int pageSize = 10; // 每页几条数据

    public void setPageIndex(int page) {
        if (page < 1) {
            page = 1;
        }
        this.pageIndex = page;
    }

    public void setPageSize(int pageSize) {
        if (pageSize < 1) {
            pageSize = 1;
        }
        if (pageSize > 20) {
            pageSize = 20;
        }
        this.pageSize = pageSize;
    }
}
