java实现多表联查接口
时间: 2023-10-07 18:07:50 浏览: 88
在Java中实现多表联查接口可以使用MyBatis框架的ResultMap和分页插件来实现。
首先,通过使用ResultMap可以实现多张表的多对多关系的联查。我们可以在ResultMap中使用collection来映射实体中的List<另一个实体>属性。这样,在查询时就可以一并查询出相关属性。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [resultMap实现多表联查](https://blog.csdn.net/qq_56769991/article/details/122829129)[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_2"}}] [.reference_item style="max-width: 50%"]
- *3* [mybatis-plus实现多表联查](https://blog.csdn.net/segegefe/article/details/123669082)[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_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文