com.ideaaedi.commonmp.injector.MybatisPlusSqlInjector Maven / Gradle / Ivy
package com.ideaaedi.commonmp.injector;
import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.ideaaedi.commonmp.mapper.BaseMapperExt;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 自定义sql注入器
*/
@Component
public class MybatisPlusSqlInjector extends DefaultSqlInjector {
@Override
public List getMethodList(Class> mapperClass, TableInfo tableInfo) {
List methodList = super.getMethodList(mapperClass, tableInfo);
methodList.add(new BaseMapperExt.ForceSelectById());
methodList.add(new BaseMapperExt.ForceSelectBatchByIds());
methodList.add(new BaseMapperExt.ForceSelectCount());
methodList.add(new BaseMapperExt.ForceSelectList());
methodList.add(new BaseMapperExt.ForceDeleteById());
methodList.add(new BaseMapperExt.ForceDeleteBatchByIds());
methodList.add(new BaseMapperExt.ForceDelete());
return methodList;
}
}