All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ideaaedi.commonmp.injector.MybatisPlusSqlInjector Maven / Gradle / Ivy

There is a newer version: 2100.10.10.LTS17
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy