package com.zy.asrs.common.domain.param; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; /** * 分页、排序、搜索参数封装 * * @author vincent * @since 2019-04-26 10:34:35 */ public class PageParam extends Page { private static final long serialVersionUID = 1L; /** * 租户id字段名称 */ private static final String TENANT_ID_FIELD = "tenantId"; /** * 查询条件 */ private final U where; /** * 是否把字段名称驼峰转下划线 */ private final boolean isToUnderlineCase; public PageParam() { this(null); } public PageParam(U where) { this(where, true); } public PageParam(U where, boolean isToUnderlineCase) { super(); this.where = where; this.isToUnderlineCase = isToUnderlineCase; if (where != null) { // 获取分页页码 if (where.getCurr() != null) { setCurrent(where.getCurr()); } // 获取分页每页数量 if (where.getLimit() != null) { setSize(where.getLimit()); } } } }