use of com.albedo.java.plugins.database.injector.method.UpdateAllById 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;
}
Also used :
UpdateAllById(com.albedo.java.plugins.database.injector.method.UpdateAllById)
List(java.util.List)
TableInfo(com.baomidou.mybatisplus.core.metadata.TableInfo)
InsertBatchSomeColumn(com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn)
ArrayUtil(cn.hutool.core.util.ArrayUtil)
FieldFill(com.baomidou.mybatisplus.annotation.FieldFill)
AbstractMethod(com.baomidou.mybatisplus.core.injector.AbstractMethod)
BaseDo(com.albedo.java.common.core.basic.domain.BaseDo)
DefaultSqlInjector(com.baomidou.mybatisplus.core.injector.DefaultSqlInjector)
UpdateAllById(com.albedo.java.plugins.database.injector.method.UpdateAllById)
AbstractMethod(com.baomidou.mybatisplus.core.injector.AbstractMethod)
InsertBatchSomeColumn(com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn)