mybaites plus使用分页插件(IPage)
contoller层
@RequestMapping("/*****")
@ApiOPeration(value="XXXXXX",httpMethod="POST")
@ApiImplicitParams(values={@ApiImplicitParam(paramType="query",name="pageNum",value="当前页",dataType="Integer",required="true"),(paramType="query",name="zize",value="显示条数",dataType="Integer",required="true")})
public ExecuteResult<?> selectCensusModel(@RequestParam(value="pageNum",default="1",Integer pageNum),@RequestParam(value="size",default="10",Integer size){
Page<泛型> page = new Page<>(pageNum,size);
return ExecuteResult.success(managerService.selectCensusManagementModel(page)); //调用service接口下的方法
}
IPage
// or (class MyPage extends Ipage
MyPage selectPageVo(MyPage page);
// or
List