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