@Override
    public boolean clientInsertSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
        method.getParameters().clear();

        FullyQualifiedJavaType parameterType = introspectedTable.getRules().calculateAllFieldsClass();
        method.addParameter(new Parameter(parameterType, "record", "@Param(\"record\")"));

        // 找出全字段对应的Model
        FullyQualifiedJavaType fullFieldModel = introspectedTable.getRules().calculateAllFieldsClass();
        // column枚举
        FullyQualifiedJavaType selectiveType = new FullyQualifiedJavaType(fullFieldModel.getShortName() + "." + ModelColumnPlugin.ENUM_NAME);
        method.addParameter(new Parameter(selectiveType, "selective", "@Param(\"selective\")", true));

        FormatTools.replaceGeneralMethodComment(commentGenerator, method, introspectedTable);

        return super.clientInsertSelectiveMethodGenerated(method, interfaze, introspectedTable);
    }
@Override
    public boolean clientInsertSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) {
        method.getParameters().clear();

        FullyQualifiedJavaType parameterType = introspectedTable.getRules().calculateAllFieldsClass();
        method.addParameter(new Parameter(parameterType, "record", "@Param(\"record\")"));

        
        FullyQualifiedJavaType fullFieldModel = introspectedTable.getRules().calculateAllFieldsClass();
        
        FullyQualifiedJavaType selectiveType = new FullyQualifiedJavaType(fullFieldModel.getShortName() + "." + ModelColumnPlugin.ENUM_NAME);
        method.addParameter(new Parameter(selectiveType, "selective", "@Param(\"selective\")", true));

        FormatTools.replaceGeneralMethodComment(commentGenerator, method, introspectedTable);

        return super.clientInsertSelectiveMethodGenerated(method, interfaze, introspectedTable);
    }
@ Override public boolean clientInsertSelectiveMethodGenerated ( Method method , Interface interfaze , IntrospectedTable introspectedTable ) { method . getParameters ( ) . clear ( ) ; FullyQualifiedJavaType parameterType = introspectedTable . getRules ( ) . calculateAllFieldsClass ( ) ; method . addParameter ( new Parameter ( parameterType , "record" , "@Param(\"record\")" ) ) ; // 找出全字段对应的Model FullyQualifiedJavaType fullFieldModel = introspectedTable . getRules ( ) . calculateAllFieldsClass ( ) ; // column枚举 FullyQualifiedJavaType selectiveType = new FullyQualifiedJavaType ( fullFieldModel . getShortName ( ) + "." + ModelColumnPlugin . ENUM_NAME ) ; method . addParameter ( new Parameter ( selectiveType , "selective" , "@Param(\"selective\")" , true ) ) ; FormatTools . replaceGeneralMethodComment ( commentGenerator , method , introspectedTable ) ; return super . clientInsertSelectiveMethodGenerated ( method , interfaze , introspectedTable ) ; }
insertSelective 方法生成
具体执行顺序 http://www.mybatis.org/generator/reference/pluggingIn.html
@param method
@param interfaze
@param introspectedTable
@return
insertSelective 方法生成 具体执行顺序 http : // www . mybatis . org / generator / reference / pluggingIn . html