mybatis分页插件(物理分页)

来源:互联网 发布:手机淘宝买家秀在哪看 编辑:程序博客网 时间:2024/03/28 23:25

以前都是自己写一个pagination类.

今天发现了一个mybatis自带的分页插件,物理分页.

收录下来

============================================================================================

</pre><pre name="code" class="html"><!-- 分页插件 --><dependency>    <groupId>com.github.pagehelper</groupId>    <artifactId>pagehelper</artifactId></dependency>
<span style="white-space:pre"></span>PageHelper.startPage((start + limit) / limit, limit);<span style="white-space:pre"></span>list = appConsoleService.queryAllAppForList(appId, appName,appState,appTypeId);<span style="white-space:pre"></span>map.put("totalProperty", ((Page<QryAppForAppList>) list).getTotal());<span style="white-space:pre"></span>map.put("root", list);


0 0
原创粉丝点击