mybatisplus批量更新方法
时间: 2023-09-26 08:11:59 浏览: 139
mp-batch-insert.zip
mybatis-plus提供了两种方式来实现批量更新操作。第一种方式是使用`saveOrUpdateBatch`方法,这个方法可以同时插入或者更新多条数据。第二种方式是通过继承`com.baomidou.mybatisplus.extension.service.impl.ServiceImpl`类来实现批量更新操作。在这个类中,有一个`updateBatchById`方法可以用于批量更新数据。这两种方式都可以根据需要选择来进行批量更新操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [批量插入或更新数据(MyBatis-plus框架)](https://blog.csdn.net/hauchun/article/details/126488062)[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: 33.333333333333336%"]
- *2* [MyBatis-Plus批量更新](https://blog.csdn.net/m0_67390379/article/details/126463376)[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: 33.333333333333336%"]
- *3* [Mybatis批量更新三种方式的实现](https://download.csdn.net/download/weixin_38667697/12751284)[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: 33.333333333333336%"]
[ .reference_list ]
阅读全文