Open wtJavaer88 opened 6 years ago
pageSize = 5
@GetMapping
public Result list(@RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0") Integer size) {
PageHelper.startPage(page, size);
List<User> list = userService.findAll();
PageInfo pageInfo = new PageInfo(list);
return ResultGenerator.genSuccessResult(pageInfo);
}
public PageInfo getAll( City city )
{
List countryList = cityService.getAll( city );
return new PageInfo( countryList );
}
比如我想每页显示5条, 在查出list以后, 返回之前设置怎么搞?