From a8e07dbe150843fccaacf9d28820a9a86aadd5be Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 13 Mar 2020 21:56:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=9B=BF=E6=8D=A2=E8=A1=A8?= =?UTF-8?q?=E5=89=8D=E7=BC=80=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ajax/libs/summernote/summernote-bs3.css | 2 +- .../com/ruoyi/generator/util/GenUtils.java | 24 +++++++++++++++++-- .../src/main/resources/vm/html/list.html.vm | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-bs3.css b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-bs3.css index 4b283bec..85c7425f 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-bs3.css +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/summernote/summernote-bs3.css @@ -5778,7 +5778,7 @@ td.visible-lg { display: table-cell !important; } } -.hidden-xs { +.summernote .hidden-xs { display: block !important; } tr.hidden-xs { diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java index 4f04e8fb..bf857b3e 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java @@ -166,12 +166,32 @@ public class GenUtils if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix)) { String[] searchList = StringUtils.split(tablePrefix, ","); - String[] replacementList = emptyList(searchList.length); - tableName = StringUtils.replaceEach(tableName, searchList, replacementList); + tableName = replaceFirst(tableName, searchList); } return StringUtils.convertToCamelCase(tableName); } + /** + * 批量替换前缀 + * + * @param replacementm 替换值 + * @param searchList 替换列表 + * @return + */ + public static String replaceFirst(String replacementm, String[] searchList) + { + String text = replacementm; + for (String searchString : searchList) + { + if (replacementm.startsWith(searchString)) + { + text = replacementm.replaceFirst(searchString, ""); + break; + } + } + return text; + } + /** * 关键字替换 * diff --git a/ruoyi-generator/src/main/resources/vm/html/list.html.vm b/ruoyi-generator/src/main/resources/vm/html/list.html.vm index 35fd8bcf..10085b75 100644 --- a/ruoyi-generator/src/main/resources/vm/html/list.html.vm +++ b/ruoyi-generator/src/main/resources/vm/html/list.html.vm @@ -71,7 +71,7 @@ 导出 - +