![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MyBatis-Plus
星域_03zhan
一起努力学习呀~
展开
-
Mybatis-plus 联表查询数据+分页展示+多条件搜索(模糊查询)--- 使用wrapper自定义sql
1.controller层: @GetMapping public Result<IPage<SelectRepositoryDto>> getAll(SelectRepositoryDto repositoryDto,PageVO pageVO){ IPage<SelectRepositoryDto> all=eRepositoryService.getAll(repositoryDto,pageVO); return .原创 2022-04-12 21:52:41 · 6648 阅读 · 1 评论 -
MyBatis-Plus分页插件IPage的使用展示------分页查询
使用了Mybatis-plus的分页插件----IPage:IPage 需要在dao层传入IPage的实现类Page对象,该对象实现了IPageIPage内部原理是基于拦截器,拦截的是方法以及方法中的参数,会判断是否是查询操作。如果是查询操作,才会进入分页的逻辑处理。进入分页的逻辑处理后,拦截器会通过反射获取该方法的参数进行判断是否存在IPage对象的实现类。如果不存在就不进行分页,存在则将该参数赋值给IPage对象。然后进行拼接sql处理完成分页操作。但是使用IPage需要注入一个Bean拦截器原创 2022-03-30 21:08:14 · 22415 阅读 · 3 评论