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

com.github.jeffreyning.mybatisplus.base.MppSqlInjector Maven / Gradle / Ivy

The newest version!
package com.github.jeffreyning.mybatisplus.base;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import com.github.jeffreyning.mybatisplus.handler.DataAutoFill;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**
 * @author ninghao
 */
public class MppSqlInjector extends DefaultSqlInjector {
    private static final Logger logger = LoggerFactory.getLogger(MppSqlInjector.class);
    //modify 1.6.0
    @Override
    public List getMethodList(Class mapperClass, TableInfo tableInfo) {
        List methodList = super.getMethodList(mapperClass, tableInfo);
        methodList.add(new SelectByMultiIdMethod());
        methodList.add(new UpdateByMultiIdMethod());
        methodList.add(new DeleteByMultiIdMethod());
        return methodList;
    }
/*    @Override
    public List getMethodList(Class mapperClass) {
        List methodList = super.getMethodList(mapperClass);
        methodList.add(new SelectByMultiIdMethod());
        methodList.add(new UpdateByMultiIdMethod());
        methodList.add(new DeleteByMultiIdMethod());
        return methodList;
    }*/
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy