疯狂的狮子li
2021-05-10 961c60dd1a546969359b717c289f7cf21d083670
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
package com.ruoyi.common.core.page;
 
import cn.hutool.core.util.StrUtil;
import lombok.*;
import lombok.experimental.Accessors;
 
/**
 * 分页数据
 * 
 * @author ruoyi
 */
 
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class PageDomain
{
    /** 当前记录起始索引 */
    private Integer pageNum;
 
    /** 每页显示记录数 */
    private Integer pageSize;
 
    /** 排序列 */
    private String orderByColumn;
 
    /** 排序的方向desc或者asc */
    private String isAsc = "asc";
 
    public String getOrderBy()
    {
        if (StrUtil.isEmpty(orderByColumn))
        {
            return "";
        }
        return StrUtil.toUnderlineCase(orderByColumn) + " " + isAsc;
    }
 
}