44323
2023-11-28 fade481769731552d9a16c79c9a5323e6f015b36
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
package com.dsh.course.util;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.util.StringUtils;
 
 
/**
 * BootStrap Table默认的分页参数创建
 *
 * @author fengshuonan
 * @date 2017-04-05 22:25
 */
public class PageFactory<T> {
 
 
    public Page<T> defaultPage(Integer limit, Integer offset, String sort, String order) {
        if (StringUtils.isEmpty(sort)) {
            Page<T> page = new Page<>((offset / limit + 1), limit);
            return page;
        } else {
            Page<T> page = new Page<T>((offset / limit + 1), limit);
            if ("asc".equals(order)) {
            } else {
            }
            return page;
        }
    }
}