Interface InsertListMapper<T>
- Type Parameters:
T- 泛型
public interface InsertListMapper<T>
通用Mapper接口,特殊方法,批量插入,支持批量插入的数据库都可以使用,例如mysql,h2等
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Method Summary
Modifier and TypeMethodDescriptionintinsertList(List<? extends T> recordList) 批量插入,支持批量插入的数据库可以使用,例如MySQL,H2等 不支持主键策略,插入前需要设置好主键的值 特别注意:该方法支持 @KeySql 注解的 genId 方式
-
Method Details
-
insertList
@InsertProvider(type=InsertListProvider.class, method="dynamicSQL") int insertList(List<? extends T> recordList) 批量插入,支持批量插入的数据库可以使用,例如MySQL,H2等 不支持主键策略,插入前需要设置好主键的值 特别注意:该方法支持 @KeySql 注解的 genId 方式- Parameters:
recordList- 记录值- Returns:
- the int
-