com.revengemission.plugins.mybatis.LogicalDeletePlugin Maven / Gradle / Ivy
package com.revengemission.plugins.mybatis;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.Interface;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.Parameter;
import org.mybatis.generator.api.dom.xml.Attribute;
import org.mybatis.generator.api.dom.xml.Document;
import org.mybatis.generator.api.dom.xml.TextElement;
import org.mybatis.generator.api.dom.xml.XmlElement;
import java.util.List;
import java.util.Map;
/**
* 逻辑删除,配置property,deletedFlagFiled和deletedFlagValue
*/
public class LogicalDeletePlugin extends AbstractXmbgPlugin {
private static final String CLIENT_METHOD_NAME = "logicalDeleteById";
private static final String CLIENT_METHOD_NAME_IDS = "logicalDeleteByIds";
private String deletedFlagTableFiled = "deleted";
private Object deletedFlagValue = 1;
@Override
public void initialized(IntrospectedTable introspectedTable) {
for (Map.Entry
© 2015 - 2025 Weber Informatics LLC | Privacy Policy