use of top.tangyh.basic.database.injector.method.UpdateAllById 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;
}
Also used :
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)
SuperEntity(top.tangyh.basic.base.entity.SuperEntity)
UpdateAllById(top.tangyh.basic.database.injector.method.UpdateAllById)
DefaultSqlInjector(com.baomidou.mybatisplus.core.injector.DefaultSqlInjector)
UpdateAllById(top.tangyh.basic.database.injector.method.UpdateAllById)
AbstractMethod(com.baomidou.mybatisplus.core.injector.AbstractMethod)
InsertBatchSomeColumn(com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn)