From d6c023521c75baa9eaaca0da0fe122563b43649d Mon Sep 17 00:00:00 2001 From: lxyer <237809796@qq.com> Date: Fri, 12 Apr 2019 11:06:59 +0800 Subject: [PATCH] =?UTF-8?q?'=E5=8D=87=E7=BA=A7=E4=BE=9D=E8=B5=96=E5=8C=85'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apidoc.html | 110 ---- apidoc.json | 552 ------------------ pom.xml | 6 +- src/main/java/net/tccn/dbq/DbExecutors.java | 3 +- .../java/net/tccn/dbq/parser/ParseMysql.java | 2 +- 5 files changed, 5 insertions(+), 668 deletions(-) delete mode 100644 apidoc.html delete mode 100644 apidoc.json diff --git a/apidoc.html b/apidoc.html deleted file mode 100644 index c6cd037..0000000 --- a/apidoc.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - 接口文档(apidoc生成) - - - - - - - - - diff --git a/apidoc.json b/apidoc.json deleted file mode 100644 index af42043..0000000 --- a/apidoc.json +++ /dev/null @@ -1,552 +0,0 @@ -{ - "servers": [ - { - "address": "0.0.0.0:80", - "servlets": [ - { - "urlregs": [ - "/meta/*" - ], - "moduleid": 0, - "name": "", - "comment": "元数据服务", - "mappings": [ - { - "url": "/meta/db_plat_list", - "auth": true, - "actionid": 0, - "comment": "数据平台", - "params": [], - "results": [], - "result": "java.util.List" - }, - { - "url": "/meta/exportsort", - "auth": true, - "actionid": 0, - "comment": "导出字段排序保存", - "params": [ - { - "name": "serviceKey", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "items", - "radix": 10, - "type": "java.util.List", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "java.util.List" - }, - { - "url": "/meta/filter_update", - "auth": true, - "actionid": 0, - "comment": "查询配置修改", - "params": [ - { - "name": "serviceKey", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "filters", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "net.tccn.base.JBean" - }, - { - "url": "/meta/findMetaTable", - "auth": true, - "actionid": 0, - "comment": "", - "params": [ - { - "name": "name", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "token", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "net.tccn.meta.MetaTable" - }, - { - "url": "/meta/importsort", - "auth": true, - "actionid": 0, - "comment": "导入字段保存", - "params": [ - { - "name": "serviceKey", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "items", - "radix": 10, - "type": "java.util.List", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "java.util.List" - }, - { - "url": "/meta/itemsort", - "auth": true, - "actionid": 0, - "comment": "字段排序", - "params": [ - { - "name": "serviceKey", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "items", - "radix": 10, - "type": "java.lang.String[]", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "[Ljava.lang.String;" - }, - { - "url": "/meta/itemupdate", - "auth": true, - "actionid": 0, - "comment": "字段修改", - "params": [ - { - "name": "serviceKey", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "items", - "radix": 10, - "type": "java.util.List", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "java.util.List" - }, - { - "url": "/meta/listcfg", - "auth": false, - "actionid": 0, - "comment": "内容列表配置", - "params": [ - { - "name": "key", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "net.tccn.base.JBean" - }, - { - "url": "/meta/showsort", - "auth": true, - "actionid": 0, - "comment": "展示字段修改", - "params": [ - { - "name": "serviceKey", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "items", - "radix": 10, - "type": "java.util.List", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "java.util.List" - }, - { - "url": "/meta/tableinfo", - "auth": true, - "actionid": 0, - "comment": "table详情", - "params": [ - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "name", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "net.tccn.base.JBean" - }, - { - "url": "/meta/tablelist", - "auth": true, - "actionid": 0, - "comment": "table列表", - "params": [ - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "catalog", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "dbPlatId", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "name", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "net.tccn.base.JBean" - } - ] - }, - { - "urlregs": [ - "/qtask/test", - "/qtask/call", - "/qtask/getSysPlat", - "/qtask/qsave" - ], - "moduleid": 0, - "name": "", - "comment": "qtask查询服务", - "mappings": [ - { - "url": "/qtask/call", - "auth": true, - "actionid": 0, - "comment": "qtask查询", - "params": [ - { - "name": "queryId", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "para", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - }, - { - "name": "platToken", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "net.tccn.base.JBean" - }, - { - "url": "/qtask/getSysPlat", - "auth": true, - "actionid": 0, - "comment": "", - "params": [ - { - "name": "token", - "radix": 10, - "type": "java.lang.String", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "net.tccn.dbq.qtask.SysPlat" - }, - { - "url": "/qtask/qsave", - "auth": true, - "actionid": 0, - "comment": "qtask保存", - "params": [ - { - "name": "qtask", - "radix": 10, - "type": "net.tccn.dbq.qtask.Qtask", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "net.tccn.base.JBean" - }, - { - "url": "/qtask/test", - "auth": true, - "actionid": 0, - "comment": "qtask调试", - "params": [ - { - "name": "qtask", - "radix": 10, - "type": "net.tccn.dbq.qtask.Qtask", - "src": "PARAMETER", - "comment": "", - "required": true - } - ], - "results": [], - "result": "net.tccn.base.JBean" - } - ] - } - ] - } - ], - "types": { - "net.tccn.dbq.qtask.Qtask": { - "queryId": { - "type": "java.lang.String", - "primary": false, - "updatable": true - }, - "name": { - "type": "java.lang.String", - "primary": false, - "updatable": true - }, - "remark": { - "type": "java.lang.String", - "primary": false, - "updatable": true - }, - "sql": { - "type": "java.lang.String", - "primary": false, - "updatable": true - }, - "para": { - "type": "java.lang.String", - "primary": false, - "updatable": true - }, - "cate": { - "type": "java.lang.String", - "primary": false, - "updatable": true - }, - "sysPlatId": { - "type": "java.lang.Integer", - "primary": false, - "updatable": true - }, - "platId": { - "type": "java.lang.Integer", - "primary": false, - "updatable": true - }, - "catalog": { - "type": "java.lang.String", - "primary": false, - "updatable": true - }, - "status": { - "type": "java.lang.Integer", - "primary": false, - "updatable": true - }, - "attr": { - "type": "java.util.HashMap", - "primary": false, - "updatable": true - }, - "_id": { - "type": "java.lang.String", - "primary": false, - "updatable": true - }, - "_key": { - "type": "java.lang.String", - "primary": false, - "updatable": true - }, - "_shows": { - "type": "java.util.Set", - "primary": false, - "updatable": true - }, - "_order": { - "type": "java.util.Map", - "primary": false, - "updatable": true - }, - "fieldName": { - "type": "java.util.function.Function", - "primary": false, - "updatable": true - }, - "arangoSource": { - "type": "net.tccn.base.arango.ArangoSource", - "primary": false, - "updatable": true - }, - "db": { - "type": "com.arangodb.ArangoDatabase", - "primary": false, - "updatable": true - }, - "collection": { - "type": "com.arangodb.ArangoCollection", - "primary": false, - "updatable": true - } - } - } -} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 71c2e7f..313456a 100644 --- a/pom.xml +++ b/pom.xml @@ -31,14 +31,14 @@ com.arangodb - arangodb-java-driver - 5.0.1 + arangodb-java-driver-async + 5.0.4 com.lxyer excel - 0.1.0 + 0.1.1 diff --git a/src/main/java/net/tccn/dbq/DbExecutors.java b/src/main/java/net/tccn/dbq/DbExecutors.java index b7f1df6..b47ac97 100644 --- a/src/main/java/net/tccn/dbq/DbExecutors.java +++ b/src/main/java/net/tccn/dbq/DbExecutors.java @@ -27,8 +27,7 @@ public class DbExecutors { MetaTable mainTable = MetaKit.getMetaTableByAlias(metaService.getTable()); DbKit dbKit = MetaKit.getDbKit(mainTable.getDbPlatId()); - System.out.println("countSql: " + sqls[0]); - System.out.println("findSql: " + sqls[1]); + //System.out.printf("----------------%n countSql:%s%n findSql:%s%n----------------%n", sqls[0], sqls[1]); CompletableFuture countFuture = CompletableFuture.supplyAsync(() -> dbKit.queryColumn(sqls[0], int.class)); CompletableFuture> listFuture = CompletableFuture.supplyAsync(() -> dbKit.findList(sqls[1], Map.class)); diff --git a/src/main/java/net/tccn/dbq/parser/ParseMysql.java b/src/main/java/net/tccn/dbq/parser/ParseMysql.java index 488e749..9387801 100644 --- a/src/main/java/net/tccn/dbq/parser/ParseMysql.java +++ b/src/main/java/net/tccn/dbq/parser/ParseMysql.java @@ -134,7 +134,7 @@ public class ParseMysql implements Parser { if (!isEmpty.test(shows)) { shows.forEach(x -> { //buf.append("`").append("x").append("`").append(","); - bufSelect.append(x).append(" as ").append("'").append(x.replace(".", "\\.")).append("',"); + bufSelect.append(x).append(" as ").append("'").append(x).append("',"); }); bufSelect.deleteCharAt(bufSelect.length() - 1); } else {