欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

springboot分页插件

程序员文章站 2022-07-08 10:47:26
...
<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper-spring-boot-starter</artifactId>
    <version>1.2.3</version>
</dependency>

  

/**
 * 分页查询
 *
 * @param paramVo
* @return
*/
@Override
public List<OwnerOrderSjtListResponseVo> getOwnerOrderSjtListPage(OwnerOrderSjtVo paramVo) {
    //使用分页插件,核心代码就这一行
PageHelper.startPage(paramVo.getPageNo(), paramVo.getPageSize());
List<OwnerOrderSjtListResponseVo> sjtListResponseVoList = ownerOrderSjtDao.getOwnerOrderSjtList(paramVo);
    return sjtListResponseVoList;
}

 

原文:https://blog.csdn.net/aiyaya_/article/details/79178984