From 9a7953aa479917a87df620016a470d4d5ff787b2 Mon Sep 17 00:00:00 2001 From: lxyer <237809796@qq.com> Date: Mon, 15 Apr 2019 17:36:06 +0800 Subject: [PATCH] . --- conf/config.txt | 3 + pom.xml | 6 + root/api/db.js | 4 +- root/api/meta.js | 6 + root/api/table.js | 8 +- root/index.html | 51 ++--- root/metadata/metatable/import.html | 9 +- root/res/css/red-kit.css | 17 ++ root/res/img/teach.png | Bin 0 -> 53415 bytes src/main/java/net/tccn/base/FileKit.java | 3 + src/main/java/net/tccn/base/JBean.java | 2 + src/main/java/net/tccn/base/Kv.java | 1 - src/main/java/net/tccn/base/TplKit.java | 125 +++++++++++ .../java/net/tccn/dbq/jdbc/JdbcAccount.java | 81 -------- .../java/net/tccn/dbq/jdbc/JdbcService.java | 154 -------------- .../java/net/tccn/dbq/jdbc/JdbcSource.java | 196 ------------------ .../java/net/tccn/service/BaseService.java | 18 ++ .../net/tccn/service/MetadataService.java | 67 +++--- .../java/net/tccn/service/_DbService.java | 57 ++--- .../java/net/tccn/service/_TableService.java | 7 +- src/main/resources/tpl/aql/table.aql | 3 + src/main/resources/tpl/sql/db.sql | 23 ++ src/test/java/RunTest.java | 20 ++ 23 files changed, 325 insertions(+), 536 deletions(-) create mode 100644 root/res/img/teach.png create mode 100644 src/main/java/net/tccn/base/TplKit.java delete mode 100644 src/main/java/net/tccn/dbq/jdbc/JdbcAccount.java delete mode 100644 src/main/java/net/tccn/dbq/jdbc/JdbcService.java delete mode 100644 src/main/java/net/tccn/dbq/jdbc/JdbcSource.java create mode 100644 src/main/resources/tpl/aql/table.aql create mode 100644 src/main/resources/tpl/sql/db.sql diff --git a/conf/config.txt b/conf/config.txt index 14287cc..ec6463f 100644 --- a/conf/config.txt +++ b/conf/config.txt @@ -17,3 +17,6 @@ arango.port=8529 arango.user=root arango.passwd=abc123 arango.database=db_dev + +#--------------- arango -------------- +tplPath=/tpl diff --git a/pom.xml b/pom.xml index 313456a..628ba39 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,12 @@ 5.0.4 + + com.jfinal + jfinal + 3.8 + + com.lxyer excel diff --git a/root/api/db.js b/root/api/db.js index ec6d58c..4900d7c 100644 --- a/root/api/db.js +++ b/root/api/db.js @@ -3,8 +3,8 @@ const db = { console.log(dbAccount) return red.postX('/_db/catalog_list', {dbAccount: JSON.stringify(dbAccount), dbPlatId}) }, - tableList({dbPlatId, catalogs}) { // 数据库表列表 - return red.postX('/_db/table_list', {dbPlatId, catalogs: JSON.stringify(catalogs)}) + tableList({dbPlatId, catalog}) { // 数据库表列表 + return red.postX('/_db/table_list', {dbPlatId, catalog}) }, tableInfo({dbPlatId, catalog, tableName}) { return red.postX('/_db/table_info', {dbPlatId, catalog, tableName}) diff --git a/root/api/meta.js b/root/api/meta.js index 85988d1..93fa584 100644 --- a/root/api/meta.js +++ b/root/api/meta.js @@ -47,5 +47,11 @@ const meta = { red.getJSON("/data/list",{fBean: JSON.stringify(fbean)}, (json = {rows:[], total:0}) => { callback(json) }) + }, + linkList() { + return red.postX('/meta/link_list') + }, + linkSave({link}) { + return red.postX('/meta/link_save', {link: JSON.stringify(link)}) } } \ No newline at end of file diff --git a/root/api/table.js b/root/api/table.js index ea6033c..bf7e7f6 100644 --- a/root/api/table.js +++ b/root/api/table.js @@ -1,12 +1,12 @@ const table = { - _sheets({cate, filePath, dbAccount, dbPlatId, catalogs}) { - return red.postX('/_table/sheets',{cate, filePath, dbAccount, dbPlatId, catalogs}) + _sheets({cate, filePath, dbAccount, dbPlatId, catalog}) { + return red.postX('/_table/sheets',{cate, filePath, dbAccount, dbPlatId, catalog}) }, sheetsExcel({filePath}) { return table._sheets({cate: "excel", filePath}) }, - sheetMySql({dbPlatId, catalogs}) { - return table._sheets({cate: "mysql", dbPlatId, catalogs: JSON.stringify(catalogs)}) + sheetMySql({dbPlatId, catalog}) { + return table._sheets({cate: "mysql", dbPlatId, catalog}) }, saveTable({dbPlatId, catalog, tableArr}) { diff --git a/root/index.html b/root/index.html index eaf3cec..8144a96 100644 --- a/root/index.html +++ b/root/index.html @@ -7,25 +7,6 @@ -
@@ -75,28 +56,26 @@
+
- - - - - - - - - - - - - - - + + + + + + + + + + + +