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

im.shs.tick.mybatis.injector.CustomSqlInjector Maven / Gradle / Ivy

The newest version!
package im.shs.tick.mybatis.injector;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import im.shs.tick.mybatis.injector.methods.Replace;
import im.shs.tick.mybatis.injector.methods.InsertIgnore;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * 自定义的 sql 注入
 *
 * @author SimpleJuly
 */
public class CustomSqlInjector extends DefaultSqlInjector {

	@Override
	public List getMethodList(Class mapperClass) {
		List methodList = new ArrayList<>();
		methodList.add(new InsertIgnore());
		methodList.add(new Replace());
		methodList.addAll(super.getMethodList(mapperClass));
		return Collections.unmodifiableList(methodList);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy