From 9d17c4972d6de53efbc87a167ce009ccd974cd11 Mon Sep 17 00:00:00 2001 From: hewei Date: Wed, 14 Nov 2018 17:47:41 +0800 Subject: [PATCH] =?UTF-8?q?issues#54=20=E5=9C=A8=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=9C=AA=E9=87=87=E7=94=A8=E6=A0=87=E5=87=86=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=B6=EF=BC=88=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E5=85=B6=E4=BB=96=E5=AD=97=E7=AC=A6=EF=BC=89=EF=BC=8C?= =?UTF-8?q?OptimisticLockerPlugin=E4=BC=9A=E5=87=BA=E9=94=99=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itfsw/mybatis/generator/plugins/LogicalDeletePlugin.java | 2 -- .../itfsw/mybatis/generator/plugins/utils/FormatTools.java | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/itfsw/mybatis/generator/plugins/LogicalDeletePlugin.java b/src/main/java/com/itfsw/mybatis/generator/plugins/LogicalDeletePlugin.java index d7ef0c0..0cc661a 100644 --- a/src/main/java/com/itfsw/mybatis/generator/plugins/LogicalDeletePlugin.java +++ b/src/main/java/com/itfsw/mybatis/generator/plugins/LogicalDeletePlugin.java @@ -331,8 +331,6 @@ public class LogicalDeletePlugin extends BasePlugin { selectByPrimaryKey.addAttribute(new Attribute("parameterType", "map")); - context.getCommentGenerator().addComment(selectByPrimaryKey); - sb = new StringBuilder(); sb.append("select "); diff --git a/src/main/java/com/itfsw/mybatis/generator/plugins/utils/FormatTools.java b/src/main/java/com/itfsw/mybatis/generator/plugins/utils/FormatTools.java index e93782f..d108ddf 100644 --- a/src/main/java/com/itfsw/mybatis/generator/plugins/utils/FormatTools.java +++ b/src/main/java/com/itfsw/mybatis/generator/plugins/utils/FormatTools.java @@ -215,7 +215,7 @@ public class FormatTools { boolean flag = false; while (elementIterator.hasNext()) { Element ele = elementIterator.next(); - if (ele instanceof TextElement && ((TextElement) ele).getContent().matches("")) { + if (ele instanceof TextElement && ((TextElement) ele).getContent().matches(".*-->.*")) { flag = false; } }