From b1501d64f9b86cf7dc410ccf6fc0a613e99094ab Mon Sep 17 00:00:00 2001 From: makejava <1353036300@qq.com> Date: Thu, 1 Nov 2018 13:45:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=AD=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EasyCodeGlobalVariableProvider.java | 1 + .../service/impl/CodeGenerateServiceImpl.java | 21 +++++- .../plugin/tool/ExtraCodeGenerateUtils.java | 65 +++++++++++++++++++ src/main/java/velocity_implicit.vm | 1 + .../description/templateDescription.html | 2 + 5 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/sjhy/plugin/tool/ExtraCodeGenerateUtils.java diff --git a/src/main/java/com/sjhy/plugin/provider/EasyCodeGlobalVariableProvider.java b/src/main/java/com/sjhy/plugin/provider/EasyCodeGlobalVariableProvider.java index d68ae5f..d22f1cf 100644 --- a/src/main/java/com/sjhy/plugin/provider/EasyCodeGlobalVariableProvider.java +++ b/src/main/java/com/sjhy/plugin/provider/EasyCodeGlobalVariableProvider.java @@ -38,6 +38,7 @@ public class EasyCodeGlobalVariableProvider extends VtlGlobalVariableProvider { result.add(new VtlLightVariable("time", file, "com.sjhy.plugin.tool.TimeUtils")); result.add(new VtlLightVariable("tableInfo", file, "com.sjhy.plugin.entity.TableInfo")); result.add(new VtlLightVariable("tableInfoList", file, "java.util.List")); + result.add(new VtlLightVariable("generateService", file, "com.sjhy.plugin.tool.ExtraCodeGenerateUtils")); return result; } diff --git a/src/main/java/com/sjhy/plugin/service/impl/CodeGenerateServiceImpl.java b/src/main/java/com/sjhy/plugin/service/impl/CodeGenerateServiceImpl.java index d64e9d7..ed4cee0 100644 --- a/src/main/java/com/sjhy/plugin/service/impl/CodeGenerateServiceImpl.java +++ b/src/main/java/com/sjhy/plugin/service/impl/CodeGenerateServiceImpl.java @@ -102,22 +102,41 @@ public class CodeGenerateServiceImpl implements CodeGenerateService { * @param title 是否显示提示 */ private void generate(Collection