src/main/java/com/itfsw/mybatis/generator/plugins/UpsertPlugin.java
@Override
    public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
        this.generateXmlElementWithSelective(document, introspectedTable);
        this.generateXmlElement(document, introspectedTable, false);
        if (introspectedTable.hasBLOBColumns()) {
            this.generateXmlElement(document, introspectedTable, true);
        }

        if (this.allowBatchUpsert) {
            this.generateBatchXmlElementSelective(document, introspectedTable);
            this.generateBatchXmlElement(document, introspectedTable, false);
            if (introspectedTable.hasBLOBColumns()) {
                this.generateBatchXmlElement(document, introspectedTable, true);
            }
        }

        return super.sqlMapDocumentGenerated(document, introspectedTable);
    }
@Override
    public boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable) {
        this.generateXmlElementWithSelective(document, introspectedTable);
        this.generateXmlElement(document, introspectedTable, false);
        if (introspectedTable.hasBLOBColumns()) {
            this.generateXmlElement(document, introspectedTable, true);
        }

        if (this.allowBatchUpsert) {
            this.generateBatchXmlElementSelective(document, introspectedTable);
            this.generateBatchXmlElement(document, introspectedTable, false);
            if (introspectedTable.hasBLOBColumns()) {
                this.generateBatchXmlElement(document, introspectedTable, true);
            }
        }

        return super.sqlMapDocumentGenerated(document, introspectedTable);
    }
@ Override public boolean sqlMapDocumentGenerated ( Document document , IntrospectedTable introspectedTable ) { this . generateXmlElementWithSelective ( document , introspectedTable ) ; this . generateXmlElement ( document , introspectedTable , false ) ; if ( introspectedTable . hasBLOBColumns ( ) ) { this . generateXmlElement ( document , introspectedTable , true ) ; } if ( this . allowBatchUpsert ) { this . generateBatchXmlElementSelective ( document , introspectedTable ) ; this . generateBatchXmlElement ( document , introspectedTable , false ) ; if ( introspectedTable . hasBLOBColumns ( ) ) { this . generateBatchXmlElement ( document , introspectedTable , true ) ; } } return super . sqlMapDocumentGenerated ( document , introspectedTable ) ; }
SQL Map Methods 生成
具体执行顺序 http://www.mybatis.org/generator/reference/pluggingIn.html
@param document
@param introspectedTable
@return
SQL Map Methods 生成 具体执行顺序 http : // www . mybatis . org / generator / reference / pluggingIn . html