#
luxiaotao1123
2023-12-19 54c4b03976baced12fb81a62177f730f912c613a
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
55
56
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<T, U extends BaseParam> extends Page<T> {
 
    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());
            }
        }
    }
 
 
 
}