From 2d9897838deadab0493aaf27508fd1f6edf3ac9f Mon Sep 17 00:00:00 2001 From: hewei Date: Fri, 4 May 2018 19:52:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B9=90=E8=A7=82=E9=94=81=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=95=B4=E5=90=88Selective=E5=A2=9E=E5=BC=BA=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/generator/plugins/OptimisticLockerPlugin.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/itfsw/mybatis/generator/plugins/OptimisticLockerPlugin.java b/src/main/java/com/itfsw/mybatis/generator/plugins/OptimisticLockerPlugin.java index 31c9c1f..20f82dc 100644 --- a/src/main/java/com/itfsw/mybatis/generator/plugins/OptimisticLockerPlugin.java +++ b/src/main/java/com/itfsw/mybatis/generator/plugins/OptimisticLockerPlugin.java @@ -129,7 +129,7 @@ public class OptimisticLockerPlugin extends BasePlugin { @Override public boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) { if (this.versionColumn != null) { - Method withVersion = this.replaceUpdateExampleMethod(introspectedTable, method, interfaze, METHOD_UPDATE_WITH_VERSION_BY_PRIMARY_KEY_SELECTIVE); + Method withVersion = this.replaceUpdatePrimaryKeyMethod(introspectedTable, method, interfaze, METHOD_UPDATE_WITH_VERSION_BY_PRIMARY_KEY_SELECTIVE); if (PluginTools.getHook(IOptimisticLockerPluginHook.class).clientUpdateWithVersionByPrimaryKeySelectiveMethodGenerated(withVersion, interfaze, introspectedTable)) { FormatTools.addMethodWithBestPosition(interfaze, withVersion); } @@ -142,7 +142,7 @@ public class OptimisticLockerPlugin extends BasePlugin { if (this.versionColumn != null) { FormatTools.addMethodWithBestPosition( interfaze, - this.replaceUpdatePrimaryKeyXmlMethod(introspectedTable, method, interfaze, METHOD_UPDATE_WITH_VERSION_BY_PRIMARY_KEY_WITH_BLOBS) + this.replaceUpdatePrimaryKeyMethod(introspectedTable, method, interfaze, METHOD_UPDATE_WITH_VERSION_BY_PRIMARY_KEY_WITH_BLOBS) ); } return super.clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(method, interfaze, introspectedTable); @@ -153,7 +153,7 @@ public class OptimisticLockerPlugin extends BasePlugin { if (this.versionColumn != null) { FormatTools.addMethodWithBestPosition( interfaze, - this.replaceUpdatePrimaryKeyXmlMethod(introspectedTable, method, interfaze, METHOD_UPDATE_WITH_VERSION_BY_PRIMARY_KEY_WITHOUT_BLOBS) + this.replaceUpdatePrimaryKeyMethod(introspectedTable, method, interfaze, METHOD_UPDATE_WITH_VERSION_BY_PRIMARY_KEY_WITHOUT_BLOBS) ); } return super.clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method, interfaze, introspectedTable); @@ -404,7 +404,7 @@ public class OptimisticLockerPlugin extends BasePlugin { * @param methodName * @return */ - private Method replaceUpdatePrimaryKeyXmlMethod(IntrospectedTable introspectedTable, Method method, Interface interfaze, String methodName) { + private Method replaceUpdatePrimaryKeyMethod(IntrospectedTable introspectedTable, Method method, Interface interfaze, String methodName) { Method withVersionMethod = new Method(method); // 替换方法名