From 7b6dc06a066ebb4c061cb8b031587155e8f35fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 31 May 2023 22:52:06 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/dromara/generator/controller/GenController.java | 2 +- .../src/main/java/org/dromara/generator/util/GenUtils.java | 1 - .../main/java/org/dromara/generator/util/VelocityUtils.java | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/controller/GenController.java b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/controller/GenController.java index 25c510be..a4509b28 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/controller/GenController.java +++ b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/controller/GenController.java @@ -56,7 +56,7 @@ public class GenController extends BaseController { GenTable table = genTableService.selectGenTableById(tableId); List tables = genTableService.selectGenTableAll(); List list = genTableService.selectGenTableColumnListByTableId(tableId); - Map map = new HashMap(); + Map map = new HashMap<>(3); map.put("info", table); map.put("rows", list); map.put("tables", tables); diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/GenUtils.java b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/GenUtils.java index 93762ae3..2e6b37b6 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/GenUtils.java +++ b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/GenUtils.java @@ -178,7 +178,6 @@ public class GenUtils { * * @param replacementm 替换值 * @param searchList 替换列表 - * @return */ public static String replaceFirst(String replacementm, String[] searchList) { String text = replacementm; diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/VelocityUtils.java b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/VelocityUtils.java index e2d89c76..f5db391b 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/VelocityUtils.java +++ b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/VelocityUtils.java @@ -109,7 +109,7 @@ public class VelocityUtils { * @return 模板列表 */ public static List getTemplateList(String tplCategory) { - List templates = new ArrayList(); + List templates = new ArrayList<>(); templates.add("vm/java/domain.java.vm"); templates.add("vm/java/vo.java.vm"); templates.add("vm/java/bo.java.vm"); @@ -208,7 +208,7 @@ public class VelocityUtils { */ public static HashSet getImportList(GenTable genTable) { List columns = genTable.getColumns(); - HashSet importList = new HashSet(); + HashSet importList = new HashSet<>(); for (GenTableColumn column : columns) { if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) { importList.add("java.util.Date");