Search in sources :

Example 11 with AbstractMethod

use of com.baomidou.mybatisplus.core.injector.AbstractMethod in project smart-cloud by smart-cloud.

the class SmartSqlInjector method getMethodList.

@Override
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
    List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
    // 添加in-line式批量插入
    methodList.add(new InsertBatchSomeColumn());
    methodList.add(new Truncate(TRUNCATE_METHOD_NAME));
    return methodList;
}
Also used : AbstractMethod(com.baomidou.mybatisplus.core.injector.AbstractMethod) Truncate(org.smartframework.cloud.starter.mybatis.plus.injector.methods.Truncate) InsertBatchSomeColumn(com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn)

Aggregations

AbstractMethod (com.baomidou.mybatisplus.core.injector.AbstractMethod)11 FieldFill (com.baomidou.mybatisplus.annotation.FieldFill)6 List (java.util.List)6 InsertBatchSomeColumn (com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn)5 DefaultSqlInjector (com.baomidou.mybatisplus.core.injector.DefaultSqlInjector)4 TableInfo (com.baomidou.mybatisplus.core.metadata.TableInfo)4 MybatisPlusInterceptor (com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor)3 PaginationInnerInterceptor (com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor)3 Bean (org.springframework.context.annotation.Bean)3 Configuration (org.springframework.context.annotation.Configuration)3 ArrayUtil (cn.hutool.core.util.ArrayUtil)2 ISqlInjector (com.baomidou.mybatisplus.core.injector.ISqlInjector)2 SelectById (com.baomidou.mybatisplus.core.injector.methods.SelectById)2 AlwaysUpdateSomeColumnById (com.baomidou.mybatisplus.extension.injector.methods.AlwaysUpdateSomeColumnById)2 DeleteAll (com.baomidou.mybatisplus.samples.deluxe.methods.DeleteAll)2 MyInsertAll (com.baomidou.mybatisplus.samples.deluxe.methods.MyInsertAll)2 MysqlInsertAllBatch (com.baomidou.mybatisplus.samples.deluxe.methods.MysqlInsertAllBatch)2 DeleteAll (com.baomidou.samples.injector.methods.DeleteAll)2 CustomSqlInjector (com.hccake.extend.mybatis.plus.injector.CustomSqlInjector)2 InsertBatchSomeColumnByCollection (com.hccake.extend.mybatis.plus.methods.InsertBatchSomeColumnByCollection)2