From bc56aae219a574eabfdb391d219116baaa8ba5ed Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: 星期五, 10 七月 2020 10:28:57 +0800
Subject: [PATCH] !33 RedisCache中所有方法参数添加final,并优化list和set存取效率,添加其它常用redis方法 RedisCache中所有方法参数添加final,并优化list和set存取效率,添加其它常用redis方法
---
ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
index 52d209b..f3e38a8 100644
--- a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
+++ b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/VelocityUtils.java
@@ -95,7 +95,14 @@
templates.add("vm/xml/mapper.xml.vm");
templates.add("vm/sql/sql.vm");
templates.add("vm/js/api.js.vm");
- templates.add("vm/vue/index.vue.vm");
+ if (GenConstants.TPL_CRUD.equals(tplCategory))
+ {
+ templates.add("vm/vue/index.vue.vm");
+ }
+ else if (GenConstants.TPL_TREE.equals(tplCategory))
+ {
+ templates.add("vm/vue/index-tree.vue.vm");
+ }
return templates;
}
@@ -147,11 +154,15 @@
{
fileName = businessName + "Menu.sql";
}
- else if (template.contains("js.vm"))
+ else if (template.contains("api.js.vm"))
{
fileName = StringUtils.format("{}/api/{}/{}.js", vuePath, moduleName, businessName);
}
- else if (template.contains("vue.vm"))
+ else if (template.contains("index.vue.vm"))
+ {
+ fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);
+ }
+ else if (template.contains("index-tree.vue.vm"))
{
fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName);
}
@@ -185,6 +196,7 @@
if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType()))
{
importList.add("java.util.Date");
+ importList.add("com.fasterxml.jackson.annotation.JsonFormat");
}
else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType()))
{
--
Gitblit v1.9.2