mybaties plus相关注解

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 selectPageVo(IPage<?> page, Integer state);
// or (class MyPage extends Ipage{ private Integer state; })
MyPage selectPageVo(MyPage page);
// or
List selectPageVo(IPage page, Integer state);

上一篇:云栖大会第二天:ACK Anywhere 来了


下一篇:mybaties的核心配置文件属性之typehandlers