PageHelper

//对页码和条数进行校验
if(pageNum == null){
pageNum = 1;
}
if (pageSize == null){
pageSize = 10;
}
if(pageNum>0&&pageSize>0){
//启用PageHelper
PageHelper.startPage(pageNum,pageSize);
}
List<ShipTo> list = shipToMapper.selectInfo();
//将list转成PageInfo
PageInfo<ShipTo> pageInfo = new PageInfo<>(list);
return pageInfo;
posted @ 2021-12-01 10:33  风吟雪  阅读(181)  评论(0编辑  收藏  举报