From 1e0f2c854592219df60de1a62974868f2486489a Mon Sep 17 00:00:00 2001 From: wangbing Date: Wed, 18 Dec 2019 10:13:55 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81SQLite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 10d81ffe554e419abacdf8300c7aac23b0c45850 --- src/main/java/xyz/wbsite/dbtool/javafx/po/Module.java | 9 ++++++++- .../SpringBoot/resources/templates/screen/index.ftl | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/po/Module.java b/src/main/java/xyz/wbsite/dbtool/javafx/po/Module.java index 3f38c77d..35c9948d 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/po/Module.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/po/Module.java @@ -61,6 +61,13 @@ public class Module extends TreeItem { return true; } + public boolean hasHtml() { + for (Table table : tables) { + if (table.getHtml()) return true; + } + return false; + } + public List getTables() { return tables; } @@ -82,7 +89,7 @@ public class Module extends TreeItem { } public void setModulePrefix(String modulePrefix) { - this.modulePrefix = modulePrefix!=null?modulePrefix:""; + this.modulePrefix = modulePrefix != null ? modulePrefix : ""; } public String getProjectName() { diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl index 96a191cc..2c376e71 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl @@ -20,15 +20,19 @@ 文件管理 <#list modules as item> +<#if item.hasHtml()> <#list item.tables as table> + <#if table.getHtml()> ${table.tableComment} + +