|
|
@@ -7,16 +7,12 @@ import org.slf4j.Logger;
|
|
7
|
7
|
import org.slf4j.LoggerFactory;
|
|
8
|
8
|
import org.springframework.web.bind.WebDataBinder;
|
|
9
|
9
|
import org.springframework.web.bind.annotation.InitBinder;
|
|
10
|
|
-import com.github.pagehelper.PageHelper;
|
|
11
|
10
|
import com.github.pagehelper.PageInfo;
|
|
12
|
11
|
import com.ruoyi.common.core.constant.HttpStatus;
|
|
13
|
12
|
import com.ruoyi.common.core.utils.DateUtils;
|
|
14
|
|
-import com.ruoyi.common.core.utils.StringUtils;
|
|
15
|
|
-import com.ruoyi.common.core.utils.sql.SqlUtil;
|
|
|
13
|
+import com.ruoyi.common.core.utils.PageUtils;
|
|
16
|
14
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
17
|
|
-import com.ruoyi.common.core.web.page.PageDomain;
|
|
18
|
15
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
19
|
|
-import com.ruoyi.common.core.web.page.TableSupport;
|
|
20
|
16
|
|
|
21
|
17
|
/**
|
|
22
|
18
|
* web层通用数据处理
|
|
|
@@ -49,15 +45,7 @@ public class BaseController
|
|
49
|
45
|
*/
|
|
50
|
46
|
protected void startPage()
|
|
51
|
47
|
{
|
|
52
|
|
- PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
53
|
|
- Integer pageNum = pageDomain.getPageNum();
|
|
54
|
|
- Integer pageSize = pageDomain.getPageSize();
|
|
55
|
|
- if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
|
|
56
|
|
- {
|
|
57
|
|
- String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
|
|
58
|
|
- Boolean reasonable = pageDomain.getReasonable();
|
|
59
|
|
- PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
|
|
60
|
|
- }
|
|
|
48
|
+ PageUtils.startPage();
|
|
61
|
49
|
}
|
|
62
|
50
|
|
|
63
|
51
|
/**
|