diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/JavaFxApplication.java b/src/main/java/xyz/wbsite/dbtool/javafx/JavaFxApplication.java index c0324833..34d057bd 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/JavaFxApplication.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/JavaFxApplication.java @@ -734,7 +734,7 @@ public class JavaFxApplication extends Application { detailTableController.getGet().setSelected(currentTable.getGet()); detailTableController.getSearch().setSelected(currentTable.getSearch()); detailTableController.getGetAll().setSelected(currentTable.getGetAll()); - + detailTableController.getHtml().setSelected(currentTable.getHtml()); } diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/ctrl/DetailTableController.java b/src/main/java/xyz/wbsite/dbtool/javafx/ctrl/DetailTableController.java index 2f0d251a..825d359e 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/ctrl/DetailTableController.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/ctrl/DetailTableController.java @@ -25,6 +25,8 @@ public class DetailTableController { private CheckBox search; @FXML private CheckBox getAll; + @FXML + private CheckBox html; public CheckBox getCreate() { return create; @@ -97,4 +99,12 @@ public class DetailTableController { public void setTablecomment(TextField tablecomment) { this.tablecomment = tablecomment; } + + public CheckBox getHtml() { + return html; + } + + public void setHtml(CheckBox html) { + this.html = html; + } } diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/manger/XmlManager.java b/src/main/java/xyz/wbsite/dbtool/javafx/manger/XmlManager.java index bc73dd8e..5789083a 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/manger/XmlManager.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/manger/XmlManager.java @@ -101,6 +101,7 @@ public class XmlManager { table.setGet(Boolean.parseBoolean(tableElement.getAttribute("get"))); table.setSearch(Boolean.parseBoolean(tableElement.getAttribute("search"))); table.setGetAll(Boolean.parseBoolean(tableElement.getAttribute("getAll"))); + table.setHtml(Boolean.parseBoolean(tableElement.getAttribute("html"))); NodeList fields = tableElement.getElementsByTagName("field"); @@ -200,6 +201,7 @@ public class XmlManager { table.setAttribute("get", Boolean.toString(t.getGet())); table.setAttribute("search", Boolean.toString(t.getSearch())); table.setAttribute("getAll", Boolean.toString(t.getGetAll())); + table.setAttribute("html", Boolean.toString(t.getHtml())); Element fields = doc.createElement("fields"); diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java index ef0044aa..4621e6e6 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/manger/callable/SpringBootCallable.java @@ -231,11 +231,12 @@ public class SpringBootCallable implements Callable { for (Table table : module.getTables()) { HashMap ctxss = new HashMap(); ctxss.put("basePackage", project.getProjectBasePackage()); + ctxss.put("module", module.getModuleName()); ctxss.put("author", project.getProjectAuthor()); ctxss.put("date", new Date()); ctxss.put("table", table); - freeMarkerManager.outputTemp(new File(m.getAbsolutePath(), table.getCName()+"Ajax.java"), option + "/java/action/ajax/Ajax.java", ctxss); + freeMarkerManager.outputTemp(new File(m.getAbsolutePath(), table.getCName() + "Ajax.java"), option + "/java/action/ajax/Ajax.java", ctxss); } } diff --git a/src/main/java/xyz/wbsite/dbtool/javafx/po/Table.java b/src/main/java/xyz/wbsite/dbtool/javafx/po/Table.java index e11c4bae..ebd3d80b 100644 --- a/src/main/java/xyz/wbsite/dbtool/javafx/po/Table.java +++ b/src/main/java/xyz/wbsite/dbtool/javafx/po/Table.java @@ -42,6 +42,7 @@ public class Table extends TreeItem { private boolean get = true; private boolean search = false; private boolean getAll = false; + private boolean html = false; /** * 对象字段 @@ -185,4 +186,12 @@ public class Table extends TreeItem { public void setGetAll(boolean getAll) { this.getAll = getAll; } + + public boolean getHtml() { + return html; + } + + public void setHtml(boolean html) { + this.html = html; + } } diff --git a/src/main/resources/fxml/tabledetail.fxml b/src/main/resources/fxml/tabledetail.fxml index f33d0522..5781afd1 100644 --- a/src/main/resources/fxml/tabledetail.fxml +++ b/src/main/resources/fxml/tabledetail.fxml @@ -36,6 +36,8 @@ +