MybatisPlusSqlInjector.java
1.07 KB
package com.tianting.infoloop.inject;
import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import java.util.List;
public class MybatisPlusSqlInjector extends DefaultSqlInjector {
private static final String SELECT_IGNORE_LOGIC_DELETE = "selectIgnoreLogicDelete";
private static final String SELECT_IGNORE_LOGIC_DELETE_BY_ID = "selectIgnoreLogicDeleteById";
private static final String SELECT_IGNORE_LOGIC_DELETE_BY_MAP = "selectIgnoreLogicDeleteByMap";
@Override
public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
List<AbstractMethod> methodList = super.getMethodList(mapperClass, tableInfo);
methodList.add(new SelectIgnoreLogicDeleteByMap(SELECT_IGNORE_LOGIC_DELETE_BY_MAP));
methodList.add(new SelectIgnoreLogicDelete(SELECT_IGNORE_LOGIC_DELETE));
methodList.add(new SelectIgnoreLogicDeleteById(SELECT_IGNORE_LOGIC_DELETE_BY_ID));
return methodList;
}
}