freecms中的分页查询

freecms支持分页查询,很多Service中都有用到,可以作为参考。

如果想支持分页查询,Action需要从BaseAction中派生出来,BaseAction中有order, currPage, pageSize等属性,在查询时传给Service,如 **Service.find(**, order, currPage,  pageSize)。在Service的查询中,需要使用 mapper 的 selectPageByExample, 在 mapper中加入 selectPageByExample接口,然后参照其它的 mapper 修改 mapper.xml文件,加入selectPageByExample方法,即可完成分页查询。

……

posted @ 2015-10-15 18:24  slimo  阅读(178)  评论(0编辑  收藏  举报