mybatisplus级联查询
时间: 2023-08-29 12:09:45 浏览: 209
mybatis-plus分页查询的实现示例
在Mybatis-plus中,可以通过使用@Result注解和子查询方法来实现级联查询。首先,在查询语句中,我们可以使用IPage接口的实现来实现自动分页。但是查询条件需要手动调用QueryWrapper类型的customSqlSegment方法来获取SQL语句并拼接到xml中。注意使用${}进行拼接,而不是#{},$是直接替换,而#会进行预编译。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [MyBatis-plus实现三级联动查询、涉及分页和模糊查询的联表查询处理](https://blog.csdn.net/qq_33235279/article/details/130319445)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [MybatisPlus使用注解的多对多级联查询](https://blog.csdn.net/qq_43694194/article/details/125523793)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文