sqlhelper使用

--sqlhelper
PagingRequest request = SqlPaginations.preparePagination(PTComoutinfoCar.getPage(),PTComoutinfoCar.getSize());--页数和条数
List<PTComoutinfoCar> list = PTComoutinfoCarMapper.selectComoutinfoCarList(PTComoutinfoCar,zcmList);--sql语句
request.getResult().getTotal() --获取总数
--pagehelper
PageHelper.startPage(PTComoutinfoCar.getPage(), PTComoutinfoCar.getSize());
List<PTComoutinfoCar> list = PTComoutinfoCarMapper.selectComoutinfoCarList(PTComoutinfoCar,zcmList);
PageInfo<PTComoutinfoCar> pageInfo = new PageInfo<>(list);
pageInfo.getList();--获取当前页十条数据
pageInfo.getTotal();--获取总数
posted @ 2019-12-16 16:31  zzxzxn  阅读(368)  评论(0编辑  收藏  举报