freecms中的分页查询
2015-10-15 18:24
288 查看
freecms支持分页查询,很多Service中都有用到,可以作为参考。
如果想支持分页查询,Action需要从BaseAction中派生出来,BaseAction中有order, currPage, pageSize等属性,在查询时传给Service,如 **Service.find(**, order, currPage, pageSize)。在Service的查询中,需要使用 mapper 的 selectPageByExample, 在 mapper中加入 selectPageByExample接口,然后参照其它的 mapper 修改 mapper.xml文件,加入selectPageByExample方法,即可完成分页查询。
……
如果想支持分页查询,Action需要从BaseAction中派生出来,BaseAction中有order, currPage, pageSize等属性,在查询时传给Service,如 **Service.find(**, order, currPage, pageSize)。在Service的查询中,需要使用 mapper 的 selectPageByExample, 在 mapper中加入 selectPageByExample接口,然后参照其它的 mapper 修改 mapper.xml文件,加入selectPageByExample方法,即可完成分页查询。
……
相关文章推荐
- Linux Screen命令使用
- bootstrap模态框(modal)使用remote方法加载数据,只能加载一次的解决办法
- linux进程(二)之基础
- linux系统服务器负载过高问题
- git 版本回退
- poj 3237 Tree 树链剖分
- Hdoj 3926 Hand in Hand
- iOS不同界面之间传值的几种方法
- UNITY3d在移动设备上的一些优化实战(一)-概述
- Pentaho Data Integration Step: BD Procedure Call
- 使页面左右无法滑动(手机端)
- NSString - sizeWithFont
- Android6.0 Fingerprint Features(指纹识别)
- Specified key was too long; max key length is 1000 bytes
- aop
- linux系统服务器负载过高问题
- 吃豆子过桥
- 关于distcc安装和使用
- 黑马程序员——Java基础---面向对象(对象的初始化、对象调用成员、单例设计模式)(4)
- tableView滑动出现删除按钮,不点击就返回崩溃