无关风月
2 天以前 ce0651907f18a57dae80065e01589e975530f53e
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
//package com.ruoyi.common.utils;
//
//import com.ruoyi.common.core.page.PageDomain;
//import com.ruoyi.common.core.page.TableSupport;
//import com.ruoyi.common.utils.sql.SqlUtil;
//
///**
// * 分页工具类
// *
// * @author ruoyi
// */
//public class PageUtils extends PageHelper
//{
//    /**
//     * 设置请求分页数据
//     */
//    public static void startPage()
//    {
//        PageDomain pageDomain = TableSupport.buildPageRequest();
//        Integer pageNum = pageDomain.getPageNum();
//        Integer pageSize = pageDomain.getPageSize();
//        String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
//        Boolean reasonable = pageDomain.getReasonable();
//        PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
//    }
//
//    /**
//     * 设置请求分页数据
//     */
//    public static void startPage(Integer pageNum,Integer pageSize)
//    {
//        PageDomain pageDomain = TableSupport.buildPageRequest();
//        String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
//        Boolean reasonable = pageDomain.getReasonable();
//        PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
//    }
//
//    /**
//     * 清理分页的线程变量
//     */
//    public static void clearPage()
//    {
//        PageHelper.clearPage();
//    }
//}