其他分享
首页 > 其他分享> > mybaties plus相关注解

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);

标签:mybaties,pageNum,MyPage,value,plus,IPage,Integer,注解,page
来源: https://www.cnblogs.com/liyibo/p/15009268.html