src/main/java/com/itfsw/mybatis/generator/plugins/LombokPlugin.java
@Override
    public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
        // @Data
        this.addAnnotations(topLevelClass, EnumLombokAnnotations.DATA);
        if (topLevelClass.getSuperClass() != null) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.EQUALS_AND_HASH_CODE_CALL_SUPER);
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.TO_STRING_CALL_SUPER);
        }

        // @Builder
        List<IntrospectedColumn> columns = introspectedTable.getPrimaryKeyColumns();
        if (this.hasBuilder && PluginTools.getHook(ILombokPluginHook.class).modelPrimaryKeyBuilderClassGenerated(topLevelClass, columns, introspectedTable)) {
            // 有子类或者父类
            if (introspectedTable.getRules().generateRecordWithBLOBsClass() || introspectedTable.getRules().generateBaseRecordClass() || topLevelClass.getSuperClass() != null) {
                this.addAnnotations(topLevelClass, EnumLombokAnnotations.SUPER_BUILDER);
            } else {
                this.addAnnotations(topLevelClass, EnumLombokAnnotations.BUILDER);
            }
        }

        // @Constructor
        if (this.hasNoArgsConstructor) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.NO_ARGS_CONSTRUCTOR);
        }
        if (this.hasAllArgsConstructor) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.ALL_ARGS_CONSTRUCTOR);
        }
        return super.modelPrimaryKeyClassGenerated(topLevelClass, introspectedTable);
    }
@Override
    public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
        // @Data
        this.addAnnotations(topLevelClass, EnumLombokAnnotations.DATA);
        if (topLevelClass.getSuperClass() != null) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.EQUALS_AND_HASH_CODE_CALL_SUPER);
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.TO_STRING_CALL_SUPER);
        }

        // @Builder
        List<IntrospectedColumn> columns = introspectedTable.getPrimaryKeyColumns();
        if (this.hasBuilder && PluginTools.getHook(ILombokPluginHook.class).modelPrimaryKeyBuilderClassGenerated(topLevelClass, columns, introspectedTable)) {
            // 有子类或者父类
            if (introspectedTable.getRules().generateRecordWithBLOBsClass() || introspectedTable.getRules().generateBaseRecordClass() || topLevelClass.getSuperClass() != null) {
                this.addAnnotations(topLevelClass, EnumLombokAnnotations.SUPER_BUILDER);
            } else {
                this.addAnnotations(topLevelClass, EnumLombokAnnotations.BUILDER);
            }
        }

        // @Constructor
        if (this.hasNoArgsConstructor) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.NO_ARGS_CONSTRUCTOR);
        }
        if (this.hasAllArgsConstructor) {
            this.addAnnotations(topLevelClass, EnumLombokAnnotations.ALL_ARGS_CONSTRUCTOR);
        }
        return super.modelPrimaryKeyClassGenerated(topLevelClass, introspectedTable);
    }
具体执行顺序 http://www.mybatis.org/generator/reference/pluggingIn.html
@param topLevelClass
@param introspectedTable
@return