use of com.baomidou.mybatisplus.core.injector.AbstractMethod in project ballcat by ballcat-projects.
the class MybatisPlusConfig method customSqlInjector.
/**
* 自定义批量插入方法注入
* @return ISqlInjector
*/
@Bean
@ConditionalOnMissingBean(ISqlInjector.class)
public ISqlInjector customSqlInjector() {
List<AbstractMethod> list = new ArrayList<>();
// 对于只在更新时进行填充的字段不做插入处理
list.add(new InsertBatchSomeColumnByCollection(t -> t.getFieldFill() != FieldFill.UPDATE));
return new CustomSqlInjector(list);
}
use of com.baomidou.mybatisplus.core.injector.AbstractMethod in project ballcat-codegen by ballcat-projects.
the class MybatisPlusConfig method customSqlInjector.
/**
* 自定义批量插入方法注入
* @return ISqlInjector
*/
@Bean
@ConditionalOnMissingBean(ISqlInjector.class)
public ISqlInjector customSqlInjector() {
List<AbstractMethod> list = new ArrayList<>();
// 对于只在更新时进行填充的字段不做插入处理
list.add(new InsertBatchSomeColumnByCollection(t -> t.getFieldFill() != FieldFill.UPDATE));
return new CustomSqlInjector(list);
}
use of com.baomidou.mybatisplus.core.injector.AbstractMethod in project onex-boot by zhangchaoxu.
the class MySqlInjector method getMethodList.
@Override
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
// 增加自动填充逻辑删除
methodList.add(new LogicDeleteByIdWithFill());
methodList.add(new LogicDeleteBatchByIdsWithFill());
methodList.add(new LogicDeleteByWrapperWithFill());
methodList.add(new SelectCountById());
return methodList;
}
use of com.baomidou.mybatisplus.core.injector.AbstractMethod in project lamp-util by zuihou.
the class LampSqlInjector method getMethodList.
@Override
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
// 增加自定义方法
methodList.add(new InsertBatchSomeColumn(i -> i.getFieldFill() != FieldFill.UPDATE));
methodList.add(new UpdateAllById(field -> !ArrayUtil.containsAny(new String[] { SuperEntity.CREATE_TIME_COLUMN, SuperEntity.CREATED_BY_COLUMN }, field.getColumn())));
return methodList;
}
use of com.baomidou.mybatisplus.core.injector.AbstractMethod in project albedo by somowhere.
the class LampSqlInjector method getMethodList.
@Override
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
// 增加自定义方法
methodList.add(new InsertBatchSomeColumn(i -> i.getFieldFill() != FieldFill.UPDATE));
methodList.add(new UpdateAllById(field -> !ArrayUtil.containsAny(new String[] { BaseDo.F_SQL_CREATED_DATE, BaseDo.F_SQL_CREATED_BY }, field.getColumn())));
return methodList;
}
Aggregations