From 963b92a7ee6dadc780ef3b77f605d58be8d9bbcf Mon Sep 17 00:00:00 2001 From: "20932067@zju.edu.cn" Date: Fri, 26 Feb 2021 22:44:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=A1=A8=E8=81=94=E6=9F=A5=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hchyun-ui/src/api/test/a.js | 54 +++ hchyun-ui/src/api/tool/associated.js | 32 -- hchyun-ui/src/views/test/a/index.vue | 379 ++++++++++++++++++ hchyun-ui/src/views/tool/gen/editTable.vue | 10 +- hchyun-ui/src/views/tool/gen/genInfoForm.vue | 277 +++---------- .../hchyun/common/core/entity/BaseEntity.java | 28 +- .../controller/AssociatedController.java | 78 ---- .../hchyun/generator/dao/AssociatedDao.java | 53 --- .../hchyun/generator/entity/AssColumn.java | 155 ------- .../generator/entity/GenBaseEntity.java | 14 - .../com/hchyun/generator/entity/GenTable.java | 10 - .../hchyun/generator/entity/RelColumn.java | 230 +++++------ .../generator/service/AssociatedService.java | 40 -- .../service/impl/AssociatedServiceImpl.java | 64 --- .../service/impl/GenTableServiceImpl.java | 8 - .../generator/utils/AssociatedUtils.java | 75 ---- .../com/hchyun/generator/utils/RelUtil.java | 2 + .../mapper/generator/AssociateMapper.xml | 46 --- .../mapper/generator/GenTableMapper.xml | 72 ++-- .../resources/mapper/generator/RelMapper.xml | 4 +- .../main/resources/vm/java/controller.java.vm | 2 +- .../src/main/resources/vm/java/dao.java.vm | 4 +- .../src/main/resources/vm/java/entity.java.vm | 8 +- .../src/main/resources/vm/vue/index.vue.vm | 36 +- .../src/main/resources/vm/xml/mapper.xml.vm | 17 +- .../test/controller/RelAController.java | 35 +- .../java/com/hchyun/test/dao/RelADao.java | 3 +- .../java/com/hchyun/test/entity/RelA.java | 29 +- .../java/com/hchyun/test/entity/RelB.java | 2 + .../java/com/hchyun/test/entity/RelC.java | 2 + .../com/hchyun/test/service/RelAService.java | 4 +- .../test/service/impl/RelAServiceImpl.java | 11 +- .../main/resources/mapper/test/RelAMapper.xml | 51 ++- 33 files changed, 784 insertions(+), 1051 deletions(-) create mode 100644 hchyun-ui/src/api/test/a.js delete mode 100644 hchyun-ui/src/api/tool/associated.js create mode 100644 hchyun-ui/src/views/test/a/index.vue delete mode 100644 hchyun/hchyun-generator/src/main/java/com/hchyun/generator/controller/AssociatedController.java delete mode 100644 hchyun/hchyun-generator/src/main/java/com/hchyun/generator/dao/AssociatedDao.java delete mode 100644 hchyun/hchyun-generator/src/main/java/com/hchyun/generator/entity/AssColumn.java delete mode 100644 hchyun/hchyun-generator/src/main/java/com/hchyun/generator/service/AssociatedService.java delete mode 100644 hchyun/hchyun-generator/src/main/java/com/hchyun/generator/service/impl/AssociatedServiceImpl.java delete mode 100644 hchyun/hchyun-generator/src/main/java/com/hchyun/generator/utils/AssociatedUtils.java delete mode 100644 hchyun/hchyun-generator/src/main/resources/mapper/generator/AssociateMapper.xml diff --git a/hchyun-ui/src/api/test/a.js b/hchyun-ui/src/api/test/a.js new file mode 100644 index 0000000..dee1003 --- /dev/null +++ b/hchyun-ui/src/api/test/a.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + + +// 查询测试a列表 +export function listA(data) { + return request({ + url: '/test/a/list', + method: 'put', + data: data + }) +} + +// 导出测试a +export function exportA(data) { + return request({ + url: '/test/a/export', + method: 'put', + data: data + }) +} + +// 查询测试a详细 +export function getA(aid) { + return request({ + url: '/test/a/' + aid, + method: 'get' + }) +} + +// 新增测试a +export function addA(data) { + return request({ + url: '/test/a', + method: 'post', + data: data + }) +} + +// 修改测试a +export function updateA(data) { + return request({ + url: '/test/a', + method: 'put', + data: data + }) +} + +// 删除测试a +export function delA(aid) { + return request({ + url: '/test/a/' + aid, + method: 'delete' + }) +} \ No newline at end of file diff --git a/hchyun-ui/src/api/tool/associated.js b/hchyun-ui/src/api/tool/associated.js deleted file mode 100644 index a4f5b39..0000000 --- a/hchyun-ui/src/api/tool/associated.js +++ /dev/null @@ -1,32 +0,0 @@ -import request from "@/utils/request"; - -/** - * 获取表信息 - * @returns {AxiosPromise} - */ -export function getTableInfos() { - return request({ - url: '/ass/tableinfos', - method: 'get' - }) -} - -/** - * 获取关联表表的字段信息 - * @param tableName 关联表表名 - * @param tableId 关联表id - * @returns {AxiosPromise} - */ -export function getAssColumns(tableName,tableId){ - return request({ - url: '/ass/'+tableName+'/'+tableId, - method: 'get' - }) -} - -export function getAssColumnsByTableId(tableId){ - return request({ - url:'/ass/'+tableId, - method: 'get' - }) -} diff --git a/hchyun-ui/src/views/test/a/index.vue b/hchyun-ui/src/views/test/a/index.vue new file mode 100644 index 0000000..a2df804 --- /dev/null +++ b/hchyun-ui/src/views/test/a/index.vue @@ -0,0 +1,379 @@ + + + diff --git a/hchyun-ui/src/views/tool/gen/editTable.vue b/hchyun-ui/src/views/tool/gen/editTable.vue index f9bca9a..a0681c2 100644 --- a/hchyun-ui/src/views/tool/gen/editTable.vue +++ b/hchyun-ui/src/views/tool/gen/editTable.vue @@ -152,8 +152,7 @@ export default { data() { return { // 选中选项卡的 name - // activeName: "cloum", - activeName: "genInfo", + activeName: "cloum", // 表格的高度 tableHeight: document.documentElement.scrollHeight - 245 + "px", // 表信息 @@ -206,9 +205,7 @@ export default { submitForm() { const basicForm = this.$refs.basicInfo.$refs.basicInfoForm; const genForm = this.$refs.genInfo.$refs.genInfoForm; - const assCloumnTable = this.$refs.genInfo.$refs.assCloumnTable; const relTables = this.$refs.genInfo.relTables; - console.log(relTables) for (let i=0;i { const validateResult = res.every(item => !!item); if (validateResult) { const genTable = Object.assign({}, basicForm.model, genForm.model); genTable.columns = this.cloumns; - genTable.assColumns = assColumns; genTable.relTables = relTables genTable.params = { treeCode: genTable.treeCode, diff --git a/hchyun-ui/src/views/tool/gen/genInfoForm.vue b/hchyun-ui/src/views/tool/gen/genInfoForm.vue index c9b8656..d6c45f0 100644 --- a/hchyun-ui/src/views/tool/gen/genInfoForm.vue +++ b/hchyun-ui/src/views/tool/gen/genInfoForm.vue @@ -8,7 +8,6 @@ - @@ -214,164 +213,6 @@ - -
- -

关联关系

- - - - 主表id - - - - - - - - - - - - - 关联表表名 - - - - - - - - - - - - - 关联表表名 - - - - - - - - - - - - - 关联查询方式 - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -582,7 +423,6 @@