Java PageHelper实现分页查询列表

@ApiOperation(value = "分页查询现金发放列表")
@GetMapping("/getCashGrantListByPage")
public ResponseBean getCashGrantListByPage(@Validated GetCashGrantListByPageEntity req) {
try {
PageInfo<CashGrantListDto> pageInfo = cashGrantService.getCashGrantListByPage(req);
return ResponseBean.success(pageInfo);
} catch (Exception e) {
logger.error("分页查询现金发放列表出错", e);
return ResponseBean.fail("分页查询现金发放列表出错");
}
}

PageHelper.startPage(req.getCurrentPage(), req.getPageSize());
posted @ 2022-03-24 14:28  春天里的桃花  阅读(272)  评论(0编辑  收藏  举报