diff --git a/hchyun-ui/package.json b/hchyun-ui/package.json
index 59170c9..b0200c2 100644
--- a/hchyun-ui/package.json
+++ b/hchyun-ui/package.json
@@ -47,6 +47,7 @@
"fuse.js": "3.4.4",
"js-cookie": "2.2.0",
"jsencrypt": "3.0.0-rc.1",
+ "highlight.js": "9.18.5",
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
diff --git a/hchyun-ui/src/views/tool/gen/editTable.vue b/hchyun-ui/src/views/tool/gen/editTable.vue
index 0cb18d8..5b01b46 100644
--- a/hchyun-ui/src/views/tool/gen/editTable.vue
+++ b/hchyun-ui/src/views/tool/gen/editTable.vue
@@ -99,6 +99,8 @@
+
+
@@ -120,7 +122,7 @@
-
+
@@ -152,6 +154,8 @@ export default {
activeName: "cloum",
// 表格的高度
tableHeight: document.documentElement.scrollHeight - 245 + "px",
+ // 表信息
+ tables: [],
// 表列信息
cloumns: [],
// 字典信息
@@ -170,6 +174,7 @@ export default {
getGenTable(tableId).then(res => {
this.cloumns = res.data.rows;
this.info = res.data.info;
+ this.tables = res.data.tables;
});
/** 查询字典下拉列表 */
getDictOptionselect().then(response => {
diff --git a/hchyun-ui/src/views/tool/gen/genInfoForm.vue b/hchyun-ui/src/views/tool/gen/genInfoForm.vue
index bd4a2d8..9d36b9d 100644
--- a/hchyun-ui/src/views/tool/gen/genInfoForm.vue
+++ b/hchyun-ui/src/views/tool/gen/genInfoForm.vue
@@ -4,9 +4,10 @@
生成模板
-
+
+
@@ -126,8 +127,8 @@
@@ -144,8 +145,8 @@
@@ -162,8 +163,47 @@
+
+
+
+
+
+
+
+
+
+ 关联子表的表名
+
+
+
+
+
+
+
+
+
+
+
+
+ 子表关联的外键名
+
+
+
+
+
+
@@ -174,56 +214,87 @@
diff --git a/hchyun-ui/src/views/tool/gen/index.vue b/hchyun-ui/src/views/tool/gen/index.vue
index 732ee64..8e9b513 100644
--- a/hchyun-ui/src/views/tool/gen/index.vue
+++ b/hchyun-ui/src/views/tool/gen/index.vue
@@ -32,7 +32,7 @@
>
- 搜索
+ 搜索
重置
@@ -41,6 +41,7 @@
-
+
{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}
@@ -91,21 +95,21 @@
align="center"
prop="tableName"
:show-overflow-tooltip="true"
- width="130"
+ width="120"
/>
@@ -165,7 +169,7 @@
:name="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))"
:key="key"
>
- {{ value }}
+
@@ -177,6 +181,15 @@
import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen";
import importTable from "./importTable";
import { downLoadZip } from "@/utils/zipdownload";
+import hljs from "highlight.js/lib/highlight";
+import "highlight.js/styles/github-gist.css";
+hljs.registerLanguage("java", require("highlight.js/lib/languages/java"));
+hljs.registerLanguage("xml", require("highlight.js/lib/languages/xml"));
+hljs.registerLanguage("html", require("highlight.js/lib/languages/xml"));
+hljs.registerLanguage("vue", require("highlight.js/lib/languages/xml"));
+hljs.registerLanguage("javascript", require("highlight.js/lib/languages/javascript"));
+hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql"));
+
export default {
name: "Gen",
components: { importTable },
@@ -289,6 +302,13 @@ export default {
this.preview.open = true;
});
},
+ /** 高亮显示 */
+ highlightedCode(code, key) {
+ const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"));
+ var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length);
+ const result = hljs.highlight(language, code || "", true);
+ return result.value || ' ';
+ },
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.tableId);
diff --git a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/BaseEntity.java b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/BaseEntity.java
index d502122..48d4d71 100644
--- a/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/BaseEntity.java
+++ b/hchyun/hchyun-common/src/main/java/com/hchyun/common/core/entity/BaseEntity.java
@@ -75,8 +75,13 @@ public class BaseEntity implements Serializable {
if (parameter != null || parameter.equals("")) {
this.parameter = parameter;
JSONObject jsonObject = JSONObject.parseObject(parameter);
- params = new HashMap<>();
- params.put("",jsonObject.get(""));
+ Object beginCreateTime = jsonObject.get("beginCreateTime");
+ Object endCreateTime = jsonObject.get("endCreateTime");
+ if (beginCreateTime != null && !beginCreateTime.equals("") && endCreateTime != null && !endCreateTime.equals("")) {
+ params = new HashMap<>();
+ params.put("beginCreateTime", beginCreateTime);
+ params.put("endCreateTime", endCreateTime);
+ }
}
}