From 8cfe104691bcec9575cb0d77bb908b6be715e6a2 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Tue, 4 Feb 2025 10:44:09 +0800 Subject: [PATCH 01/47] =?UTF-8?q?APIAuto:=20=E4=BF=9D=E5=AD=98=E5=92=8C?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=B7=B2=E9=80=89=E9=A1=B9=E7=9B=AE=E5=8F=8A?= =?UTF-8?q?=20URL=20Host?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/api/js/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js index e4a55d5..3d8dfaa 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js @@ -2699,6 +2699,8 @@ https://github.com/Tencent/APIJSON/issues vUrl.value = item.host + bu this.showUrl(false, bu) + + this.saveCache('', 'projectHost', this.projectHost) }, listProjectHost: function() { @@ -7505,6 +7507,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea if (type == 'project') { if (isEnter || item.host == (this.projectHost || {}).host) { this.projectHost = {project: item.project} + this.saveCache('', 'projectHost', this.projectHost) } return } @@ -12795,6 +12798,11 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea '\n} catch (e) {\n' + e.message) } try { //这里是初始化,不能出错 + var projectHost = this.getCache('', 'projectHost') + if (projectHost != null) { + this.projectHost = projectHost + } + var projectHosts = this.getCache('', 'projectHosts') if (projectHosts != null && projectHosts.length >= 1) { this.projectHosts = projectHosts From 7a7eca6418bd8eafd0912b43385c3095c2e5d171 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Tue, 4 Feb 2025 17:06:37 +0800 Subject: [PATCH 02/47] =?UTF-8?q?APIAuto:=20=E6=89=93=E5=BC=80=E7=BD=91?= =?UTF-8?q?=E9=A1=B5=E7=9B=B4=E6=8E=A5=E5=8A=A0=E8=BD=BD=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=86=8D=E9=9C=80=E8=A6=81=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E6=89=93=E5=BC=80=E8=AE=BE=E7=BD=AE=E6=89=8D=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/api/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js index 3d8dfaa..c8ca572 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js @@ -12898,10 +12898,10 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea //无效,只能在index里设置 vUrl.value = this.getCache('', 'URL_BASE') this.listHistory() - if (this.isScriptShow) { +// if (this.isScriptShow) { this.changeScriptType() this.listScript() - } +// } var isLoggedIn = this.User != null && this.User.id != null && this.User.id > 0 if (isLoggedIn) { From 8536d8ae1483e9c348fb7d316beb7dccebccd220 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Sun, 9 Feb 2025 15:13:23 +0800 Subject: [PATCH 03/47] =?UTF-8?q?Java=EF=BC=9AMultiDataSource=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=BB=A3=E7=90=86=E8=BD=AC=E5=8F=91=20HTTP=20PATCH=20?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=EF=BC=9BAPIAuto=EF=BC=9A=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E6=82=AC=E6=B5=AE=E6=98=BE=E7=A4=BA=E5=AE=8C?= =?UTF-8?q?=E6=95=B4=20=E5=90=8D=E7=A7=B0=20URL=EF=BC=9B=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=20HTTP=20Error=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=9C=BA=E6=99=AF=E4=B8=B2=E8=81=94=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E6=9C=89=E6=97=B6=E9=94=99=E7=94=A8=E5=8F=82=E6=95=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../APIJSONBoot-MultiDataSource/pom.xml | 7 +++++++ .../main/java/apijson/boot/DemoController.java | 17 ++++++++++------- .../src/main/resources/static/api/index.html | 8 ++++---- .../src/main/resources/static/api/js/main.js | 17 ++++++++++++----- 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml index 148bbe2..ea2e03d 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml @@ -286,6 +286,13 @@ + + + + + + + diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoController.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoController.java index bf3f44f..764f707 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoController.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoController.java @@ -25,14 +25,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.*; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.stereotype.Service; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestClientResponseException; import org.springframework.web.client.RestTemplate; @@ -1869,6 +1864,14 @@ protected String sendRequest(HttpSession session, HttpMethod method, String url, String rspBody = null; try { RestTemplate client = new RestTemplate(); + try { // 支持 PATCH 方法,需要 Maven 依赖 org.apache.httpcomponents.client5:httpclient5 + HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); + client.setRequestFactory(requestFactory); + } + catch (Throwable e) { + e.printStackTrace(); + } + HttpEntity requestEntity = new HttpEntity<>(method == HttpMethod.GET ? null : body, headers); ResponseEntity entity = client.exchange(url, method, requestEntity, String.class); diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/index.html b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/index.html index 17d4e56..2d8c495 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/index.html +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/index.html @@ -203,7 +203,7 @@
  • - +
    • - {{ isCaseGroupEditable ? '' : item.Chain.groupName }}{{' (' + (item.Chain.count - 1) + ') '}} + {{ isCaseGroupEditable ? '' : item.Chain.groupName }}{{' (' + (item.Chain.count - 1) + ') '}} @@ -256,7 +256,7 @@
      - +
      • diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js index c8ca572..ba4c064 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js @@ -2700,6 +2700,7 @@ https://github.com/Tencent/APIJSON/issues vUrl.value = item.host + bu this.showUrl(false, bu) + this.saveCache('', 'URL_BASE', baseUrl) this.saveCache('', 'projectHost', this.projectHost) }, @@ -3136,7 +3137,6 @@ https://github.com/Tencent/APIJSON/issues commentObj = JSONResponse.updateStandard({}, mapReq2); } - var callback = function (randomName, constConfig, constJson) { // 用现成的测试过的更好,Response 与 Request 严格对应 // var mapReq = {}; @@ -3169,6 +3169,7 @@ https://github.com/Tencent/APIJSON/issues // commentObj = JSONResponse.updateStandard({}, mapReq2); // } + const userId = App.User.id; const methods = App.methods; const method = App.isShowMethod() ? App.method : null; const extName = App.exTxt.name; @@ -3178,6 +3179,7 @@ https://github.com/Tencent/APIJSON/issues const req = isExportRandom && btnIndex <= 0 ? { format: false, 'Random': { + userId: userId, toId: 0, chainGroupId: cgId, chainId: cId, @@ -3187,6 +3189,8 @@ https://github.com/Tencent/APIJSON/issues config: config }, 'TestRecord': { + 'userId': userId, + 'documentId': documentId, 'host': StringUtil.isEmpty(baseUrl, true) ? null : baseUrl, 'chainGroupId': cgId, 'chainId': cId, @@ -3198,6 +3202,7 @@ https://github.com/Tencent/APIJSON/issues format: false, 'Document': isEditResponse ? null : { 'id': did == null ? undefined : did, + 'userId': userId, 'project': StringUtil.isEmpty(project, true) ? null : project, // 'testAccountId': currentAccountId, // 'chainGroupId': cgId, @@ -3213,6 +3218,7 @@ https://github.com/Tencent/APIJSON/issues 'detail': App.getExtraComment() || ((App.currentRemoteItem || {}).Document || {}).detail, }, 'TestRecord': isEditResponse != true && did != null ? null : { + 'userId': userId, // 'chainGroupId': cgId, 'documentId': isEditResponse ? did : undefined, 'randomId': 0, @@ -7184,12 +7190,12 @@ https://github.com/Tencent/APIJSON/issues if (res == null) { res = {} } else { - var time = res.config == null || res.config.metadata == null ? 0 : (res.config.metadata.startTime || 0) - if (time < this.lastReqTime) { + var time = res.config == null || res.config.metadata == null ? null : res.config.metadata.startTime; + if (time != null && time > 0 && time < this.lastReqTime) { return } - this.lastReqTime = time + this.lastReqTime = time == null || time <= 0 ? 0 : time; } if (DEBUG) { @@ -7514,8 +7520,9 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea var project = (this.projectHost || {}).project - if (isFilter && type == 'caseGroup') { + if (isFilter && (type == 'caseGroup' || type == 'chainGroup')) { this.isCaseGroupEditable = true +// this.isChainGroupEditable = true } var obj = event.srcElement ? event.srcElement : event.target; From b4c9b71d4f046fe270609a64178caed220531e2a Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Sun, 9 Feb 2025 17:01:26 +0800 Subject: [PATCH 04/47] =?UTF-8?q?Java=EF=BC=9A=E6=96=B0=E5=A2=9E=20MultiDa?= =?UTF-8?q?taSource=20=E6=96=B0=E5=A2=9E=E5=8D=8E=E4=B8=BA=20openGauss-?= =?UTF-8?q?=E9=AB=98=E6=96=AF=E6=95=B0=E6=8D=AE=E5=BA=93=E5=BC=80=E6=BA=90?= =?UTF-8?q?=E7=89=88=EF=BC=8C=E9=AB=98=E5=8F=AF=E7=94=A8=E3=80=81=E9=AB=98?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E3=80=81=E9=AB=98=E5=AE=89=E5=85=A8=E3=80=81?= =?UTF-8?q?=E9=AB=98=E5=BC=B9=E6=80=A7=E3=80=81=E9=AB=98=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E3=80=81=E6=98=93=E9=83=A8=E7=BD=B2=E3=80=81=E6=98=93=E8=BF=81?= =?UTF-8?q?=E7=A7=BB=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 需要依赖 APIJSON 7.5.0 或自己补充 DATABASE_OPENGAUSS 和 isOpenGauss 等代码 --- .../APIJSONBoot-MultiDataSource/pom.xml | 12 ++++++++++++ .../main/java/apijson/boot/DemoApplication.java | 9 +++++++++ .../main/java/apijson/demo/DemoSQLConfig.java | 16 +++++++++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml index ea2e03d..70d1a73 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml @@ -219,6 +219,18 @@ mongodb-jdbc 2.0.3 + + + + + + + + + + + + diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java index 910e62f..53d9515 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java @@ -223,6 +223,15 @@ public void addCorsMappings(CorsRegistry registry) { // Log.e(TAG, "加载 TDengine 驱动失败,请检查 pom.xml 中 com.taosdata.jdbc 版本是否存在以及可用 !!!"); // } + // try { //加载驱动程序 + // Log.d(TAG, "尝试加载 openGauss 驱动 <<<<<<<<<<<<<<<<<<<<< "); + // Class.forName("org.opengauss.Driver"); + // Log.d(TAG, "成功加载 openGauss 驱动!>>>>>>>>>>>>>>>>>>>>> "); + // } catch (ClassNotFoundException e) { + // e.printStackTrace(); + // Log.e(TAG, "加载 openGauss 驱动失败,请检查 pom.xml 中 org.opengauss 版本是否存在以及可用 !!!"); + // } + // APIJSON 配置 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Map COMPILE_MAP = AbstractVerifier.COMPILE_MAP; diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java index 82918ad..28434f8 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java @@ -190,6 +190,9 @@ public String getDBVersion() { // if (isSurrealDB()) { // return "2.0.0"; //TODO 改成你自己的 // } + // if (isOpenGauss()) { + // return "5.0.0"; //TODO 改成你自己的 + // } return null; } @@ -257,6 +260,9 @@ public String getDBUri() { // // return "surrealkv://localhost:8000"; //TODO 改成你自己的 // return "ws://localhost:8000"; //TODO 改成你自己的 // } + // if (isOpenGauss()) { + // return "jdbc:opengauss://127.0.0.1:5432/postgres?currentSchema=" + DEFAULT_SCHEMA; //TODO 改成你自己的 + // } return null; } @@ -318,6 +324,10 @@ public String getDBAccount() { // if (isSurrealDB()) { // return "root"; //TODO 改成你自己的 // } + // if (isOpenGauss()) { + // return "postgres"; //TODO 改成你自己的 + // // 不允许用初始账号,需要 CREATE USER 创建新账号并 GRANT 授权 return "opengauss"; //TODO 改成你自己的 + // } return null; } @@ -379,6 +389,9 @@ public String getDBPassword() { // if (isSurrealDB()) { // return "root"; //TODO 改成你自己的 // } + // if (isOpenGauss()) { + // return "openGauss@123"; //TODO 改成你自己的 + // } return null; } @@ -501,7 +514,8 @@ protected int getMaxCombineCount() { // // @Override // public String getSQLSchema() { - // return SurrealDBUtil.getSQLSchema(super.getSQLSchema(), isSurrealDB()); + // return isOpenGauss() ? "public" : super.getSQLSchema(); + // // return SurrealDBUtil.getSQLSchema(super.getSQLSchema(), isSurrealDB()); //// return InfluxDBUtil.getSQLSchema(super.getSQLSchema(), isIoTDB()); //// return IoTDBUtil.getSQLSchema(super.getSQLSchema().replaceAll("-", "."), isIoTDB()); // } From a7bfd022e9f46e176770997b1e37cd76609c8d62 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Sun, 16 Feb 2025 23:06:45 +0800 Subject: [PATCH 05/47] =?UTF-8?q?Java=EF=BC=9AMultiDataSource=20=E5=92=8C?= =?UTF-8?q?=20Javax=20=E7=89=88=20Demo=20=E9=83=BD=E5=8D=87=E7=BA=A7=20API?= =?UTF-8?q?JSON=207.5.5,=20apijson-framework=20=E5=8F=8A=E8=87=AA=E8=BA=AB?= =?UTF-8?q?=207.1.7,=20apijson-column=202.1.5,=20apijson-router=202.1.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../APIJSONBoot-MultiDataSource/pom.xml | 11 ++++++----- APIJSON-Java-Server/APIJSONDemo-Javax/pom.xml | 15 ++++----------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml index 70d1a73..dc42bea 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml @@ -5,7 +5,7 @@ apijson.boot apijson-boot-multi-datasource - 7.1.0 + 7.1.7 jar APIJSONBoot-MultiDataSource @@ -59,22 +59,22 @@ com.github.Tencent APIJSON - 7.1.0 + 7.5.5 com.github.APIJSON apijson-framework - 7.1.0 + 7.1.7 com.github.APIJSON apijson-column - 2.1.0 + 2.1.5 com.github.APIJSON apijson-router - 2.1.0 + 2.1.7 @@ -298,6 +298,7 @@ + diff --git a/APIJSON-Java-Server/APIJSONDemo-Javax/pom.xml b/APIJSON-Java-Server/APIJSONDemo-Javax/pom.xml index 2c9ae24..aac5881 100755 --- a/APIJSON-Java-Server/APIJSONDemo-Javax/pom.xml +++ b/APIJSON-Java-Server/APIJSONDemo-Javax/pom.xml @@ -5,7 +5,7 @@ apijson.demo apijson-demo-javax - 7.1.5 + 7.1.7 APIJSONDemo Demo project for Testing APIJSON Server based on SpringBoot, compat JDK 1.8~16 and SpringBoot 1.4~2.7 @@ -21,26 +21,19 @@ com.github.Tencent APIJSON - 7.1.0 + 7.5.5 com.github.APIJSON apijson-framework - 7.1.5 + 7.1.7 com.github.APIJSON apijson-router - 2.1.5 - - - - - jakarta.servlet - jakarta.servlet-api - 6.0.0 + 2.1.7 From 99718e0d8e4230b139330c960d80743c5ba61b08 Mon Sep 17 00:00:00 2001 From: longjieyi Date: Mon, 17 Feb 2025 21:06:10 +0800 Subject: [PATCH 06/47] =?UTF-8?q?fix=EF=BC=9AgetConnection=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=86=85=E7=9A=84key=E7=9A=84=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/apijson/demo/DemoSQLExecutor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/demo/DemoSQLExecutor.java b/APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/demo/DemoSQLExecutor.java index 6119a68..7208ab0 100644 --- a/APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/demo/DemoSQLExecutor.java +++ b/APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/demo/DemoSQLExecutor.java @@ -49,13 +49,13 @@ public class DemoSQLExecutor extends APIJSONSQLExecutor { @Override public Connection getConnection(SQLConfig config) throws Exception { Log.d(TAG, "getConnection config.getDatasource() = " + config.getDatasource()); - - Connection c = connectionMap.get(config.getDatabase()); + String connectionKey = config.getDatasource() + "-" + config.getDatabase(); + Connection c = connectionMap.get(connectionKey); if (c == null || c.isClosed()) { try { DataSource ds = DemoApplication.getApplicationContext().getBean(DataSource.class); // 另一种方式是 DruidConfig 初始化获取到 Datasource 后给静态变量 DATA_SOURCE 赋值: ds = DruidConfig.DATA_SOURCE.getConnection(); - connectionMap.put(config.getDatabase(), ds == null ? null : ds.getConnection()); + connectionMap.put(connectionKey, ds == null ? null : ds.getConnection()); } catch (Exception e) { Log.e(TAG, "getConnection try { " + "DataSource ds = DemoApplication.getApplicationContext().getBean(DataSource.class); .." From b5b1466de24993d38f1b8220678ca0edea033f0d Mon Sep 17 00:00:00 2001 From: longjieyi Date: Tue, 18 Feb 2025 10:33:15 +0800 Subject: [PATCH 07/47] =?UTF-8?q?fix=EF=BC=9AgetConnection=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=86=85=E7=9A=84key=E7=9A=84=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/apijson/demo/DemoSQLExecutor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/APIJSON-Java-Server/APIJSONBoot-BigData/src/main/java/apijson/demo/DemoSQLExecutor.java b/APIJSON-Java-Server/APIJSONBoot-BigData/src/main/java/apijson/demo/DemoSQLExecutor.java index 0983685..1d48c5f 100644 --- a/APIJSON-Java-Server/APIJSONBoot-BigData/src/main/java/apijson/demo/DemoSQLExecutor.java +++ b/APIJSON-Java-Server/APIJSONBoot-BigData/src/main/java/apijson/demo/DemoSQLExecutor.java @@ -49,13 +49,13 @@ public class DemoSQLExecutor extends APIJSONSQLExecutor { @Override public Connection getConnection(SQLConfig config) throws Exception { Log.d(TAG, "getConnection config.getDatasource() = " + config.getDatasource()); - - Connection c = connectionMap.get(config.getDatabase()); + String connectionKey = config.getDatasource() + "-" + config.getDatabase(); + Connection c = connectionMap.get(connectionKey); if (c == null || c.isClosed()) { try { DataSource ds = DemoApplication.getApplicationContext().getBean(DataSource.class); // 另一种方式是 DruidConfig 初始化获取到 Datasource 后给静态变量 DATA_SOURCE 赋值: ds = DruidConfig.DATA_SOURCE.getConnection(); - connectionMap.put(config.getDatabase(), ds == null ? null : ds.getConnection()); + connectionMap.put(connectionKey, ds == null ? null : ds.getConnection()); } catch (Exception e) { Log.e(TAG, "getConnection try { " + "DataSource ds = DemoApplication.getApplicationContext().getBean(DataSource.class); .." From cb66a114129c0d82fabbd7c6528c161fb2d81f82 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Sat, 1 Mar 2025 17:46:47 +0800 Subject: [PATCH 08/47] =?UTF-8?q?ManticoreSearch:=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Manticore/single/sys_Comment.sql | 200 ++++++++++++++++++++++++++ Manticore/single/sys_Moment.sql | 54 +++++++ Manticore/single/sys_apijson_user.sql | 60 ++++++++ 3 files changed, 314 insertions(+) create mode 100644 Manticore/single/sys_Comment.sql create mode 100644 Manticore/single/sys_Moment.sql create mode 100644 Manticore/single/sys_apijson_user.sql diff --git a/Manticore/single/sys_Comment.sql b/Manticore/single/sys_Comment.sql new file mode 100644 index 0000000..715d903 --- /dev/null +++ b/Manticore/single/sys_Comment.sql @@ -0,0 +1,200 @@ +-- MySQL dump 10.13 Distrib 8.0.31, for macos12 (x86_64) +-- +-- Host: 47.122.25.116 Database: sys +-- ------------------------------------------------------ +-- Server version 5.7.43-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `comment` +-- + +DROP TABLE IF EXISTS `comment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `comment` ( + `id` bigint, + `toId` bigint, + `userId` bigint, + `momentId` bigint, + `date` timestamp, + `content` text +); +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `comment` +-- + +LOCK TABLES `comment` WRITE; +/*!40000 ALTER TABLE `comment` DISABLE KEYS */; +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (4,0,38710,470,'2017-02-01 11:20:50','This is a Content...-4'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (13,0,82005,58,'2017-02-01 11:20:50','This is a Content...-13'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (22,221,82001,470,'2017-02-01 11:20:50','修改'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (44,0,82003,170,'2017-02-01 11:20:50','This is a Content...-44'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (45,0,93793,301,'2017-02-01 11:20:50','This is a Content...-45'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (47,4,70793,470,'2017-02-01 11:20:50','This is a Content...-47'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (51,45,82003,301,'2017-02-01 11:20:50','This is a Content...-51'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (54,0,82004,170,'2017-02-01 11:20:50','This is a Content...-54'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (68,0,82005,371,'2017-02-01 11:20:50','This is a Content...-68'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (76,45,93793,301,'2017-02-01 11:20:50','This is a Content...-76'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (77,13,93793,58,'2017-02-01 11:20:50','This is a Content...-77'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (97,13,82006,58,'2017-02-01 11:20:50','This is a Content...-97'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (99,44,70793,170,'2017-02-01 11:20:50','This is a Content...-99'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (110,0,93793,371,'2017-02-01 11:23:24','This is a Content...-110'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (114,0,82001,371,'2017-03-02 05:56:06','test multi put'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (115,0,38710,371,'2017-03-02 05:56:06','This is a Content...-115'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (116,0,70793,371,'2017-03-02 05:56:06','This is a Content...-116'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (120,0,93793,301,'2017-03-02 05:56:06','This is a Content...-110'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (124,0,82001,301,'2017-03-02 05:56:06','test multi put'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (157,0,93793,371,'2017-02-01 11:20:50','This is a Content...-157'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (158,0,93793,301,'2018-07-12 17:28:23','This is a Content...-157'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (160,0,82001,235,'2017-03-02 05:56:06','This is a Content...-160'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (162,0,93793,12,'2017-03-06 05:03:45','This is a Content...-162'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (163,0,82001,235,'2017-03-02 05:56:06','This is a Content...-163'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (164,0,93793,12,'2017-03-06 05:03:45','This is a Content...-164'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (167,0,82001,58,'2017-03-25 11:48:41','Nice!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (168,1490442545077,82001,235,'2017-03-25 11:49:14','???'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (172,162,82001,12,'2017-03-25 12:22:58','OK'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (173,0,38710,58,'2017-03-25 12:25:13','Good'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (175,0,38710,12,'2017-03-25 12:26:53','Java is the best program language!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (178,0,38710,511,'2017-03-25 12:30:55','wbw'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (182,110,82001,371,'2017-03-26 06:12:52','hahaha'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (188,97,82001,58,'2017-03-26 07:21:32','1646'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (190,0,82001,58,'2017-03-26 07:22:13','dbdj'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (206,54,82001,170,'2017-03-29 03:04:23','ejej'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (209,13,82001,58,'2017-03-29 03:05:59','hehj'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (300,97,82001,58,'2017-03-29 03:06:07','hj'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (301,194,82001,235,'2017-03-29 03:06:24','jj'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (4001,0,82001,58,'2017-03-29 08:39:52','I would like to say …'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490776944301,0,82001,58,'2017-03-29 08:42:24','hello'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490776966828,173,82001,58,'2017-03-29 08:42:46','me too'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490777905437,0,82001,543,'2017-03-29 08:58:25','rr'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490778122719,175,82001,12,'2017-03-29 09:02:02','Yeah! I think so!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490778494751,1490778122719,82001,12,'2017-03-29 09:08:14','reply Android82001'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490778681337,166,82001,12,'2017-03-29 09:11:21','gg'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490780759866,99,82001,170,'2017-03-29 09:45:59','99'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490781009548,51,82001,301,'2017-03-29 09:50:09','3'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490781032005,45,82001,301,'2017-03-29 09:50:32','93793'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490781817044,209,38710,58,'2017-03-29 10:03:37','82001'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490781850893,1490776966828,38710,58,'2017-03-29 10:04:10','haha!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490781857242,190,38710,58,'2017-03-29 10:04:17','nice'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490781865407,1490781857242,38710,58,'2017-03-29 10:04:25','wow'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490781899147,197,38710,12,'2017-03-29 10:04:59','kaka'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490794439561,1490778681337,82001,12,'2017-03-29 13:33:59','gg?'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490794610632,172,82001,12,'2017-03-29 13:36:50','All right'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490794937137,1490794919957,82001,12,'2017-03-29 13:42:17','All right ok ok'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490794953438,1490794937137,82001,12,'2017-03-29 13:42:33','All right ok ok ll'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490796241178,0,38710,58,'2017-03-29 14:04:01','Anything else?'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490796629591,175,38710,12,'2017-03-29 14:10:29','well'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490798710678,110,38710,371,'2017-03-29 14:45:10','110'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490800971064,175,38710,12,'2017-03-29 15:22:51','I do'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490848396072,175,82001,12,'2017-03-30 04:33:16','Lemon'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490848581424,166,82001,12,'2017-03-30 04:36:21','82001ejej'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490850764448,162,82001,12,'2017-03-30 05:12:44','-162'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490850844016,0,82001,12,'2017-03-30 05:14:04','I like it'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490850876656,1490800971064,82001,12,'2017-03-30 05:14:36','I do so'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490854894566,175,82001,12,'2017-03-30 06:21:34','it does be a good lang'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863443219,1490850844016,82002,12,'2017-03-30 08:44:03','me too!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863507114,4,82003,470,'2017-03-30 08:45:07','yes'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863563124,0,82003,704,'2017-03-30 08:46:03','I want one'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863651493,0,70793,595,'2017-03-30 08:47:31','wow'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863661426,1490780759866,70793,170,'2017-03-30 08:47:41','66'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863676989,0,70793,12,'2017-03-30 08:47:56','Shy'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863711703,0,70793,511,'2017-03-30 08:48:31','I hope I can join'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863717947,178,70793,511,'2017-03-30 08:48:37','what?'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863783276,1490863711703,93793,511,'2017-03-30 08:49:43','haha welcome'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863903900,0,82006,470,'2017-03-30 08:51:43','SOGA'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863915675,0,82006,235,'2017-03-30 08:51:55','Good boy'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863938712,0,82006,12,'2017-03-30 08:52:18','Handsome!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490863978239,1490796241178,82006,58,'2017-03-30 08:52:58','there still remains a question…'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490864016738,0,82006,511,'2017-03-30 08:53:36','I want to have a try!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490864023700,0,82006,543,'2017-03-30 08:53:43','oops'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490864039264,0,82006,551,'2017-03-30 08:53:59','Wonderful!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490864152008,0,82006,58,'2017-03-30 08:55:52','U R ugly( ´?` )'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490864254400,1490863915675,82044,235,'2017-03-30 08:57:34','And I have no idea'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490864276824,0,82044,12,'2017-03-30 08:57:56','Oh my God!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490864292184,1490864152008,82044,58,'2017-03-30 08:58:12','haha!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490864379424,1490863938712,82001,12,'2017-03-30 08:59:39','Thank you~'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490864400210,1490864276824,82001,12,'2017-03-30 09:00:00','Amazing, isnt it?'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490874908570,1490864023700,82055,543,'2017-03-30 11:55:08','yeah'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490874930994,1490777905437,82055,543,'2017-03-30 11:55:30','yy'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490874968779,0,82055,12,'2017-03-30 11:56:08','I love it'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490875033494,0,82055,301,'2017-03-30 11:57:13','More Comments'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490875040761,158,82055,301,'2017-03-30 11:57:20','157'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490875046704,120,82055,301,'2017-03-30 11:57:26','110'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490879678127,0,82001,543,'2017-03-30 13:14:38','Baby you are a firework!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490973736662,1490973715568,70793,170,'2017-03-31 15:22:16','Hello, I am a fresh man'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1490973890875,1490864039264,93793,551,'2017-03-31 15:24:50','While I donot think so…'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491014830404,1490864016738,82001,511,'2017-04-01 02:47:10','Have a nice day!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491119615611,1490864023700,82001,543,'2017-04-02 07:53:35','$$'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491119670185,68,82001,371,'2017-04-02 07:54:30','Leave a word'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491119695580,0,82001,371,'2017-04-02 07:54:55','leave a word'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491130701902,0,38710,511,'2017-04-02 10:58:21','Thanks for your supports (-^?^-)'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491209763162,0,82001,1491200468898,'2017-04-03 08:56:03','How do you do'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491277552385,0,82001,58,'2017-04-04 03:45:52','Seven'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491312438951,1490863651493,82001,595,'2017-04-04 13:27:18','WaKaKa!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491709064513,0,82001,551,'2017-04-09 03:37:44','soga'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491740899179,0,82001,470,'2017-04-09 12:28:19','www'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491798370749,0,82002,551,'2017-04-10 04:26:10','Nice!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491798499667,115,82002,371,'2017-04-10 04:28:19','I do not understand…'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1491830543193,0,82001,170,'2017-04-10 13:22:23','What is the hell?'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1492932228287,1491209763162,38710,1491200468898,'2017-04-23 07:23:48','fine,thanks'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES 1493094307810,0,82001,551,'2017-04-25 04:25:04','删除或修改数据请先创建,不要动原来的,谢谢'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1493094307910,0,82001,551,'2017-04-25 04:26:04','用POST新增数据'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1493186363132,1490850764448,82001,12,'2017-04-26 05:59:23','sndnd'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1502632433970,0,82002,1493835799335,'2017-08-13 13:53:53','just have fun!'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1508053783278,0,82001,1508053762227,'2017-10-15 07:49:43','可以的'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1508072695833,0,82003,1508072633830,'2017-10-15 13:04:55','心疼地抱住自己(๑´ㅂ`๑)'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1508227498578,1491798370749,82001,551,'2017-10-17 08:04:58','g'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1508462026394,1490850844016,82001,12,'2017-10-20 01:13:46','欧'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1508492585904,1508462026394,82001,12,'2017-10-20 09:43:05','my god'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1509003045509,0,82001,1508072633830,'2017-10-26 07:30:45','hhh'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1509346549158,0,82001,170,'2017-10-30 06:55:49','呵呵'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1509346556395,0,82001,170,'2017-10-30 06:55:56','测试'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1510795816462,162,82001,12,'2017-11-16 01:30:16','赞'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1510813284894,0,82001,12,'2017-11-16 06:21:24','asdasdasdas'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1510813295700,162,82001,12,'2017-11-16 06:21:35','adsdasdasdasd'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1511374269759,99,82001,170,'2017-11-22 18:11:09','记录里'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1511374274194,0,82001,170,'2017-11-22 18:11:14','哦哦哦'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1511407695342,0,1511407581570,371,'2017-11-23 03:28:15','好的'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1511407702981,157,1511407581570,371,'2017-11-23 03:28:22','你好'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1511878024415,0,1511761906715,12,'2017-11-28 14:07:04','你今年'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1511878031610,1511878024415,1511761906715,12,'2017-11-28 14:07:11','不鸟你'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1512035094555,0,82001,12,'2017-11-30 09:44:54','呵呵呵'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1512035117021,0,82001,32,'2017-11-30 09:45:17','图片看不了啊'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1512039030970,1512035117021,82001,32,'2017-11-30 10:50:30','一般九宫格图片都是压缩图,分辨率在300*300左右,加载很快,点击放大后才是原图,1080P左右'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1512531859019,0,1512531601485,1512314438990,'2017-12-06 03:44:19','666'),(1512533520832,1512531859019,38710,1512314438990,'2017-12-06 04:12:00','嘿嘿'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1513656045399,0,82001,1508072633830,'2017-12-19 04:00:45','444444'),(1514425796195,0,82001,1513094436910,'2017-12-28 01:49:56','一起'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1514473034425,1514425796195,93793,1513094436910,'2017-12-28 14:57:14','干啥?'),(1514478784653,0,82001,1513094436910,'2017-12-28 16:33:04','bug很多'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1514506206319,1514478784653,38710,1513094436910,'2017-12-29 00:10:06','碰到哪些了呢?欢迎指出,尽快解决^_^'),(1514617131036,0,82005,1513094436910,'2017-12-30 06:58:51','口子'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1514858592813,0,82001,1514858533480,'2018-01-02 02:03:12','铁人'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1514858640958,0,38710,1514858533480,'2018-01-02 02:04:00','斯塔克工业'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1514858707767,0,70793,1514858533480,'2018-01-02 02:05:07','壕友乎?'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1514960713300,0,82001,1513094436910,'2018-01-03 06:25:13','1'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1514960744185,1512531859019,82001,1512314438990,'2018-01-03 06:25:44','哇'); +INSERT INTO `comment`(`id`, `toId`, `userId`, `momentId`, `date`, `content`) VALUES (1515057852156,0,82001,58,'2018-01-04 09:24:12','你说'); + +/*!40000 ALTER TABLE `comment` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2024-06-16 0:39:18 diff --git a/Manticore/single/sys_Moment.sql b/Manticore/single/sys_Moment.sql new file mode 100644 index 0000000..19c18f9 --- /dev/null +++ b/Manticore/single/sys_Moment.sql @@ -0,0 +1,54 @@ +-- MySQL dump 10.13 Distrib 8.0.31, for macos12 (x86_64) +-- +-- Host: 47.122.25.116 Database: sys +-- ------------------------------------------------------ +-- Server version 5.7.43-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `moment` +-- + +DROP TABLE IF EXISTS `moment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `moment` ( + `id` bigint, + `userId` bigint, + `date` timestamp, + `content` text, + `praiseUserIdList` json, + `pictureList` json +); +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `moment` +-- + +LOCK TABLES `moment` WRITE; +/*!40000 ALTER TABLE `moment` DISABLE KEYS */; +INSERT INTO `moment`(`id`, `userId`, `date`, `content`, `praiseUserIdList`, `pictureList`) VALUES (12,70793,'2017-02-08 08:06:11','APIJSON,let interfaces and documents go to hell !','[70793, 93793, 82044, 82040, 82055, 90814, 38710, 82002, 82006, 1508072105320, 82001]','[\"https://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"https://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://camo.githubusercontent.com/788c0a7e11a4f5aadef3c886f028c79b4808613a/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343932353935372d313732303737333630382e6a7067\", \"https://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\"]'),(15,82001,'2017-02-08 00:06:11','\"12312gjhtest15','[82002, 70793, 38710, 93793, 82005, 82009, 82007, 82014, 82021, 82026, 82006, 82011, 82016, 82020, 82024, 82004, 82012, 82015, 82019, 82025, 82003, 82008, 82013, 82018, 82023, 82010, 82022, 82017]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(32,82002,'2017-02-08 08:06:11','tst','[38710, 82001, 82005]','[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\", \"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\", \"https://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]'),(58,90814,'2017-02-01 11:14:31','This is a Content...-435','[38710, 82003, 82005, 93793, 82006, 82044, 82001]','[\"https://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\"]'),(170,70793,'2017-02-01 11:14:31','This is a Content...-73','[82044, 82002, 82001]','[\"https://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"https://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"https://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg\"]'),(235,38710,'2017-02-08 08:06:11','APIJSON,let interfaces and documents go to hell !','[82001]','[\"http://abc.cn/1.png\"]'),(301,93793,'2017-02-01 11:14:31','This is a Content...-301','[38710, 93793, 82003, 82005, 82040, 82055, 82002, 82001]','[\"https://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]'),(371,82002,'2017-02-01 11:14:31','This is a Content...-371','[90814, 93793, 82003, 82005, 82006, 82040, 82002, 82001]','[\"https://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"https://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\", \"https://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]'),(470,38710,'2017-02-01 11:14:31','This is a Content...-470','[]','[\"https://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]'),(511,38710,'2017-02-08 08:06:11','APIJSON,let interfaces and documents go to hell !','[70793, 93793, 82001]','[\"https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067\", \"https://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"https://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\"]'),(543,93793,'2017-02-08 08:06:11','[]','[82001]','[\"https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067\", \"https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067\", \"https://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"https://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"https://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\"]'),(551,70793,'2017-02-08 08:06:11','海洋动物数量减少,如果非吃不可,不点杀也是在保护它们','[82001]','[\"https://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png\"]'),(595,38710,'2017-03-05 05:29:19','[]','[70793, 82002, 82001]','[\"https://common.cnblogs.com/images/icon_weibo_24.png\", \"https://static.oschina.net/uploads/user/19/39085_50.jpg\"]'),(704,38710,'2017-03-12 09:39:44','APIJSON is a JSON Transmission Structure Protocol…','[82003, 82002, 82001]','[\"https://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000\", \"https://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000\"]'),(1491200468898,38710,'2017-04-03 06:21:08','APIJSON, let interfaces go to hell!','[82001]','[\"https://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000\", \"https://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000\"]'),(1493835799335,38710,'2017-05-03 18:23:19','APIJSON is a JSON Transmission Structure Protocol…','[82002, 82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1508053762227,82003,'2017-10-15 07:49:22','我也试试','[1515565976140, 82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1508072491570,82002,'2017-10-15 13:01:31','有点冷~','[82001, 82002]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1508072633830,93793,'2017-10-15 13:03:53','天凉了\n有男朋友的抱男盆友\n有女朋友的抱女朋友\n而我就比较牛逼了\n我不冷。','[82005, 82002, 70793, 38710, 82045, 82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1512314438990,38710,'2017-12-03 15:20:38','APIJSON iOS-Swift版发布,自动生成请求代码,欢迎使用^_^ \n https://github.com/TommyLemon/APIJSON','[82002, 70793, 1512531601485, 82001]','[\"https://images2018.cnblogs.com/blog/660067/201712/660067-20171203231829476-1202860128.jpg\"]'),(1513094436910,38710,'2017-12-12 16:00:36','APIJSON-Python已发布,欢迎体验^_^\nhttps://github.com/TommyLemon/APIJSON','[82005, 82001]','[\"https://raw.githubusercontent.com/TommyLemon/APIJSON/master/picture/APIJSON_Auto_get.jpg\", \"https://raw.githubusercontent.com/TommyLemon/APIJSON/master/picture/APIJSON_Auto_code.jpg\", \"https://raw.githubusercontent.com/TommyLemon/APIJSON/master/picture/APIJSON_Auto_doc.jpg\"]'),(1514017444961,82002,'2017-12-23 08:24:04','123479589679','[82002, 1520242280259, 82001, 70793, 1524042900591, 1528264711016]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1514858533480,82056,'2018-01-02 02:02:13','I am the Iron Man','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1516086423441,93793,'2018-01-16 07:07:03','抢到票了,开心ପ( ˘ᵕ˘ ) ੭ ☆','[93793, 38710, 82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1520242333325,1520242280259,'2018-03-05 09:32:13','法拉利','[1520242280259, 70793, 82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1523935589834,1523626157302,'2018-04-17 03:26:29','by第一条动态','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1523936332614,1523626157302,'2018-04-17 03:38:52','by第二条','[82001, 1523935772553]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1524178455305,1524042900591,'2018-04-19 22:54:15','早上好啊','[1524042900591, 38710, 82003, 82001, 1523626157302]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1524298780222,1524298730523,'2018-04-21 08:19:40','e说点什么吧~','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1524826652626,1524298730523,'2018-04-27 10:57:32','说点什么吧~哈哈哈','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1527498273102,1527498229991,'2018-05-28 09:04:33','说点什么吧~yui','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1527821296110,1527495857924,'2018-06-01 02:48:16','这是我的商品1号','[1527821445610, 82003, 82001]','[\"http://pic31.nipic.com/20130710/13151003_093759013311_2.jpg\", \"https://cbu01.alicdn.com/img/ibank/2013/514/580/740085415_2101098104.310x310.jpg\"]'),(1527830331780,1527495857924,'2018-06-01 05:18:51','各种购物袋','[38710, 82002, 1527495857924, 82003]','[\"https://cbu01.alicdn.com/img/ibank/2018/292/335/8058533292_57202994.310x310.jpg\", \"https://cbu01.alicdn.com/img/ibank/2018/089/747/8586747980_1843977904.310x310.jpg\", \"https://cbu01.alicdn.com/img/ibank/2016/025/123/3012321520_471514049.310x310.jpg\", \"https://cbu01.alicdn.com/img/ibank/2017/729/995/4800599927_69233977.310x310.jpg\", \"https://cbu01.alicdn.com/img/ibank/2016/377/263/3755362773_609022431.310x310.jpg\"]'),(1527830474378,1527495857924,'2018-06-01 05:21:14','电视机','[1527495857924, 82001]','[\"https://cbu01.alicdn.com/img/ibank/2017/231/077/4524770132_781046171.310x310.jpg\"]'),(1528251335464,1528250827953,'2018-06-06 02:15:35','meiyou','[1528250827953]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1528260617722,1528255497767,'2018-06-06 04:50:17','。。。。','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1528269822710,1528264711016,'2018-06-06 07:23:42','hhhhhhh','[1528250827953, 82001, 82002]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1528269988360,1528250827953,'2018-06-06 07:26:28','为什么发动态默认会有这两张图片啊?不可以选择自己的图片','[1528250827953]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1528274037224,1528250827953,'2018-06-06 08:33:57','说点什么吧~hgdsryh','[]','[\"https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E4%BA%91%E5%8D%97%E9%A3%8E%E6%99%AF%E5%9B%BE%E7%89%87&step_word=&hs=0&pn=0&spn=0&di=163958046450&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=2&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=-1&cs=1403824732%2C1921310327&os=1571651475%2C3950546936&simid=3426978648%2C550887139&adpicid=0&lpn=0&ln=1985&fr=&fmq=1528273681226_R&fm=result&ic=0&s=undefined&se=&sme=&tab=0&width=&height=&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Botg9aaa_z%26e3Bv54AzdH3Fowssrwrj6_kt2_88an88_8_z%26e3Bip4s&gsm=0&rpstart=0&rpnum=0&islist=&querylist=\", \"https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E4%BA%91%E5%8D%97%E9%A3%8E%E6%99%AF%E5%9B%BE%E7%89%87&step_word=&hs=0&pn=12&spn=0&di=105575240210&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=2&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=-1&cs=832573604%2C2847830718&os=1862795828%2C1682403963&simid=4268934412%2C608274877&adpicid=0&lpn=0&ln=1985&fr=&fmq=1528273681226_R&fm=result&ic=0&s=undefined&se=&sme=&tab=0&width=&height=&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fkkf_z%26e3Bfzi54j_z%26e3Bv54AzdH3Fna-ccbaa-1jpwts-d90cd8ll-a-8_z%26e3Bip4s&gsm=0&rpstart=0&rpnum=0&islist=&querylist=\"]'),(1528356378455,1528264711016,'2018-06-07 07:26:18','去旅游嘛~','[82001]','[]'),(1528356421201,1528264711016,'2018-06-07 07:27:01','(ง •̀_•́)ง','[]','[]'),(1528356496939,1528356470041,'2018-06-07 07:28:16','(๑•ั็ω•็ั๑)','[]','[]'),(1528462217322,1528339692804,'2018-06-08 12:50:17','有没有小姐姐准备端午出游的?\n地点:北戴河','[]','[\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072366455&di=c0d4b15b2c4b70aad49e6ae747f60742&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg\", \"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072499167&di=5b5621d117edbc5d344a03ba0a6b580b&imgtype=0&src=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg\"]'),(1528676875139,1528339692804,'2018-06-11 00:27:55','123456','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1531062713966,82002,'2018-07-08 15:11:53','云南好美啊( ◞˟૩˟)◞','[82001, 82005, 38710, 70793, 93793, 82003, 1531969715979]','[\"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072366455&di=c0d4b15b2c4b70aad49e6ae747f60742&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg\", \"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072499167&di=5b5621d117edbc5d344a03ba0a6b580b&imgtype=0&src=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg\"]'),(1531969818357,1531969715979,'2018-07-19 03:10:18','http://q18idc.com','[1531969715979, 82001, 38710, 1534926301956]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1533908589726,1533835176109,'2018-08-10 13:43:09','我的','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1535781636403,1532188114543,'2018-09-01 06:00:36','这是一个测试','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1536064087117,1532188114543,'2018-09-04 12:28:07','说点什么吧~奥哈达','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1536805585275,82003,'2018-09-13 02:26:25','iPhone Xs发布了,大家怎么看?','[82002, 82005, 70793, 82003, 82001]','[\"https://pic1.zhimg.com/80/v2-e129b40810070443add1c28e6185c894_hd.jpg\"]'),(1541557989440,38710,'2018-11-07 02:33:09','自动化接口和文档 APIJSON 3.0.0 发布\nhttps://www.oschina.net/news/101548/apijson-3-0-released','[82001]','[\"https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Auto_get.jpg\"]'),(1544276216289,1544276209348,'2018-12-08 13:36:56','说点什么吧~ey','[1544276209348]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1545187924367,1544503822963,'2018-12-19 02:52:04','说哼哼唧唧点什么吧~','[1544503822963, 82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1553096819293,1553095415917,'2019-03-20 15:46:59','说点什么吧~睡觉觉很喜欢','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1556387217941,82002,'2019-04-27 17:46:57','说点什么吧~啦啦啦','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1557415707105,82003,'2019-05-09 15:28:27','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1557754680146,82012,'2019-05-13 13:38:00','马云:工作上要有996的精神,生活上要669,也就是6天6次关键要“久”。大家怎么看?','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1558798664043,82003,'2019-05-25 15:37:44','测试新增动态','[82001]','[\"https://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1559129731896,1559129626356,'2019-05-29 11:35:31','xfshter','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1563605336326,1563605318975,'2019-07-20 06:48:56','说点什么吧~死','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1568086574157,70793,'2019-09-10 03:36:14','今天天气不错,到处都是提拉米苏雪','[]','[]'),(1568087960391,70793,'2019-09-10 03:59:20','今天天气不错,到处都是提拉米苏雪','[82001]','[]'),(1568087960412,70793,'2019-09-10 03:59:20','今天天气不错,到处都是提拉米苏雪','[]','[]'),(1572177746393,82002,'2019-10-27 12:02:26','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1577855941093,38710,'2020-01-01 05:19:01','大家新年快乐鸭~','[82001, 38710]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1583574596245,82003,'2020-03-07 09:49:56','测试新增动态','[82001]','[\"https://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1594127400223,82002,'2020-07-07 13:10:00','APIJSON,let interfaces and documents go to hell !','[82001, 82002]','[]'),(1594385349411,82002,'2020-07-10 12:49:09','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1594385350586,82003,'2020-07-10 12:49:10','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1606312076474,82002,'2020-11-25 13:47:56','[]','[82001]','[]'),(1608215822376,82003,'2020-12-17 14:37:02','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1611503147421,82002,'2021-01-24 15:45:47','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1617562878095,82002,'2021-04-04 19:01:18','test','[82002, 82001]','[\"http://abc.com/2.png\"]'),(1619511861462,82003,'2021-04-27 08:24:21','对象关系映射- 维基百科,自由的百科全书','[82003, 82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1624700434072,82002,'2021-06-26 09:40:34','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1627367513331,70793,'2021-07-27 06:31:53','今天天气不错,到处都是提拉米苏雪','[]','[]'),(1627367646018,70793,'2021-07-27 06:34:06','什么玩意啊!数据呢!','[]','[]'),(1630746489563,82001,'2021-09-04 09:08:09','\"312312312\"gjhtest04','[82001]','[]'),(1630892587084,82001,'2021-09-06 01:43:07','\"你OK里咯ing3123123\"gjh','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1630893108502,82001,'2021-09-06 01:51:48','\"\"55982\"\"','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1630894539008,82001,'2021-09-06 02:15:39','\"说点什么吧~12\"','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1630980585686,82001,'2021-09-07 02:09:45','说点什么吧~;;;;','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1631257842981,82001,'2021-09-10 07:10:42','dasdas','[82001]','[]'),(1632294230574,82003,'2021-09-22 07:03:50','APIJSON,let interfaces and documents go to hell !','[82001, 82003]','[]'),(1634090516839,82001,'2021-10-13 02:01:56','huojianfeng','[82001]','[]'),(1637405012523,82003,'2021-11-20 10:43:32','测试新增动态','[82001]','[\"https://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1637590638534,82004,'2021-11-22 14:17:18','APIJSON,let interfaces and documents go to hell !','[82002]','[]'),(1637590638567,82004,'2021-11-22 14:17:18','测试新增动态','[]','[\"https://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1637985952844,82001,'2021-11-27 04:05:52','111','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1638327674898,82002,'2021-12-01 03:01:14','海洋动物数量减少,如果非吃不可,不点杀也是在保护它们','[82001]','[]'),(1645416338268,82005,'2022-02-21 04:05:38','说点什么吧~嘤嘤嘤','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1646030604412,38710,'2022-02-28 06:43:24','今天天气不错,到处都是提拉米苏雪','[38710]','[]'),(1646030924765,38710,'2022-02-28 06:48:44','测试专用测试专用测试专用测试专用','[38710]','[]'),(1646031858837,38710,'2022-02-28 07:04:18','387103871038710387103871038710387103871038710','[38710]','[]'),(1646657313491,82002,'2022-03-07 12:48:33','今天天气不错,^^^!!!','[]','[]'),(1647781303020,82003,'2022-03-20 13:01:43','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1648517248247,82003,'2022-03-29 01:27:28','今天天气不错,到处都是提拉米苏雪','[]','[]'),(1648604448242,82002,'2022-03-30 01:40:48','今天天气不错,到处都是提拉米苏雪','[]','[]'),(1648604448403,82002,'2022-03-30 01:40:48','今天天气不错,到处都是提拉米苏雪','[]','[]'),(1649086182892,82002,'2022-04-04 15:29:42','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1649086185746,82003,'2022-04-04 15:29:45','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1649672357944,82001,'2022-04-11 10:19:17','今天天气真好','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1651846337935,82002,'2022-05-06 14:12:17','今天天气不错,到处都是提拉米苏雪','[]','[]'),(1661002561890,1660645570787,'2022-08-20 13:36:01','老铁双击888!','[]','[]'),(1665293930441,82002,'2022-10-09 05:38:50','我就试试','[]','[]'),(1670420616061,82001,'2022-12-07 13:43:36','APIJSON, let interfaces go to hell!','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1670981809240,82001,'2022-12-14 01:36:49','今天是2022年12月14日,zyy在这里测试!','[]','[]'),(1670981978461,82002,'2022-12-14 01:39:38','今天是2022年12月14日,测试82002!','[]','[]'),(1673797744161,82001,'2023-01-15 15:49:04','对方官方的说法','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1674308870813,82001,'2023-01-21 13:47:50','说点什么吧~看看就','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1675742375160,82001,'2023-02-07 03:59:35','测试看看','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1675910359578,82001,'2023-02-09 02:39:19','APIJSON, let interfaces go to hell!','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1677051490546,82001,'2023-02-22 07:38:10','说点什么吧~哈哈V大夫才发货呢','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1677051517418,82001,'2023-02-22 07:38:37','说点什么吧~444个重复过程','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1677144307563,82001,'2023-02-23 09:25:07','APIJSON, let interfaces go to hell!','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1677223327076,82001,'2023-02-24 07:22:07','测试新增动态','[82001]','[\"https://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1677684807693,82001,'2023-03-01 15:33:27','APIJSON, let interfaces go to hell!','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1678877778484,82001,'2023-03-15 10:56:18','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1679078499770,82001,'2023-03-17 18:41:39','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1679313363196,82001,'2023-03-20 11:56:03','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1679908549702,82002,'2023-03-27 09:15:49','APIJSON,let interfaces and documents go to hell !','[82002]','[]'),(1680494769487,82001,'2023-04-03 04:06:09','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1681403443101,82001,'2023-04-13 16:30:43','测试新增动态','[]','[\"https://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1681403571733,82002,'2023-04-13 16:32:51','测试新增动态','[82002]','[\"https://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1681404270495,82003,'2023-04-13 16:44:30','测试新增动态','[]','[\"https://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1682096402171,82001,'2023-04-21 17:00:02','Test of 0622','[82001]','[]'),(1682103762126,82002,'2023-04-21 19:02:42','55555','[82002]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1682137190808,38710,'2023-04-22 04:19:50','555','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1682171738141,38710,'2023-04-22 13:55:38','哈哈哈哈','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1682269375445,82001,'2023-04-23 17:02:55','','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1682314259661,82001,'2023-04-24 05:30:59','说点什么吧~哈哈哈','[]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1682320252383,38710,'2023-04-24 07:10:52','123123123','[]','[]'),(1682320399121,38710,'2023-04-24 07:13:19','今天天气不错,到处都是提拉米苏雪','[]','[]'),(1682406888196,82001,'2023-04-25 07:14:48','gjhtest10087','[]','[]'),(1682501802339,82001,'2023-04-26 09:36:42','说点什么吧~发朋友圈','[82001]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1682783909204,82001,'2023-04-29 15:58:29','说点什么吧~哈喽','[]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1683911924815,82001,'2023-05-12 17:18:44','APIJSON, let interfaces go to hell!','[]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1684979928084,82001,'2023-05-25 01:58:48','test01','[82001]','[]'),(1684980752101,82001,'2023-05-25 02:12:32','ctmd','[82001]','[]'),(1684980965206,82001,'2023-05-25 02:16:05','Test of 0206','[]','[]'),(1684981220795,82001,'2023-05-25 02:20:20','test ctmd','[82001]','[]'),(1684981222020,82001,'2023-05-25 02:20:22','test ctmd','[]','[]'),(1684981356791,82001,'2023-05-25 02:22:36','123','[]','[]'),(1684981540478,82001,'2023-05-25 02:25:40','Test of 6838','[82001]','[]'),(1685592384514,82001,'2023-06-01 04:06:24','APIJSON, let interfaces go to hell!','[82001]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1685592394221,82001,'2023-06-01 04:06:34','APIJSON, let interfaces go to hell!','[]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1686563612923,82001,'2023-06-12 09:53:33','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1690970599784,82001,'2023-08-02 10:03:19','说点什么吧~粑粑麻麻','[]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1690970609817,82001,'2023-08-02 10:03:29','说点什么吧~粑粑麻麻','[82001]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1692260707538,82002,'2023-08-17 08:25:07','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1693680292080,82001,'2023-09-02 18:44:53','APIJSON,let interfaces and documents go to hell !','[82001]','[]'),(1700372077715,82002,'2023-11-19 05:34:37','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1700488719094,82002,'2023-11-20 13:58:39','测试发动态','[82002]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1703425198937,88888,'2023-12-24 13:39:59','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1704175454867,82002,'2024-01-14 04:04:48','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1704175454868,82002,'2024-01-14 04:04:49','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1704175454869,82002,'2024-01-15 03:53:21','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1704175454870,82002,'2024-01-15 03:53:22','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1704175454873,1490109742863,'2024-01-15 04:22:45','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1704175454874,1490109742863,'2024-01-15 04:22:47','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1705663946041,82001,'2024-01-19 11:32:26','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1705663946759,82001,'2024-01-19 11:32:26','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1705675844446,88888,'2024-01-19 14:50:44','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1705675845903,88888,'2024-01-19 14:50:45','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1705675845904,82001,'2024-01-21 09:38:56','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1705675845905,82001,'2024-01-21 09:39:09','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1705675845914,82002,'2024-01-22 04:13:41','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1705675845917,82001,'2024-05-04 16:20:24','测试新增动态','[82001]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1714964371588,82001,'2024-05-06 02:59:31','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1715133130408,82001,'2024-05-08 01:52:10','APIJSON, let interfaces go to hell!','[]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1715133150286,82001,'2024-05-08 01:52:30','APIJSON, let interfaces go to hell!','[82001]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1715133152873,82001,'2024-05-08 01:52:32','APIJSON, let interfaces go to hell!','[82001]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1715133172877,82001,'2024-05-08 01:52:52','APIJSON, let interfaces go to hell!','[82001]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1715133174704,82001,'2024-05-08 01:52:54','APIJSON, let interfaces go to hell!','[82001]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1715221781960,82002,'2024-05-09 02:29:41','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1715222278578,82002,'2024-05-26 04:19:55','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1715222278579,82002,'2024-05-26 04:19:56','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1716706970370,38710,'2024-05-26 07:02:50','测试新增动态','[82001]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1716707004081,38710,'2024-05-26 07:03:24','测试新增动态','[82001]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1716707116336,82001,'2024-05-26 07:05:16','测试新增动态','[82001]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1717124655020,82002,'2024-05-31 03:04:15','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1717468800883,82001,'2024-06-04 02:40:00','APIJSON,let interfaces and documents go to hell !','[]','[]'),(1717468801248,82001,'2024-06-04 02:40:01','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1717561747710,82001,'2024-06-05 04:29:07','说点什么吧~1001','[]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1717757674241,82001,'2024-06-07 10:54:34','APIJSON, let interfaces go to hell!','[]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1717757679298,82001,'2024-06-07 10:54:39','APIJSON, let interfaces go to hell!','[]','[\"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"http://common.cnblogs.com/images/icon_weibo_24.png\"]'),(1717862884827,82001,'2024-06-08 16:08:04','测试新增动态','[82001]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'),(1717862890826,38710,'2024-06-08 16:08:10','测试新增动态','[]','[\"http://static.oschina.net/uploads/user/48/96331_50.jpg\"]'); +/*!40000 ALTER TABLE `moment` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2024-06-16 0:37:27 diff --git a/Manticore/single/sys_apijson_user.sql b/Manticore/single/sys_apijson_user.sql new file mode 100644 index 0000000..c2e73c4 --- /dev/null +++ b/Manticore/single/sys_apijson_user.sql @@ -0,0 +1,60 @@ +-- MySQL dump 10.13 Distrib 8.0.31, for macos12 (x86_64) +-- +-- Host: 47.122.25.116 Database: sys +-- ------------------------------------------------------ +-- Server version 5.7.43-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `apijson_user` +-- + +DROP TABLE IF EXISTS `apijson_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `apijson_user` ( + `id` bigint, + `sex` integer, + `name` text, + `tag` text, + `head` text, + `contactIdList` json, + `pictureList` json, + `date` timestamp +); +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `apijson_user` +-- + +LOCK TABLES `apijson_user` WRITE; +/*!40000 ALTER TABLE `apijson_user` DISABLE KEYS */; +INSERT INTO `apijson_user`(`id`, `sex`, `name`, `tag`, `head`, `contactIdList`, `pictureList`, `date`) VALUES (38710,0,'TommyLemon','Android&Java','https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000','[82003, 82005, 90814, 82004, 82009, 82002, 82044, 93793, 70793]','[\"https://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000\", \"https://common.cnblogs.com/images/icon_weibo_24.png\"]','2017-02-01 11:21:50'); +INSERT INTO `apijson_user`(`id`, `sex`, `name`, `tag`, `head`, `contactIdList`, `pictureList`, `date`) VALUES (70793,0,'Strong','djdj','https://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000','[38710, 82002]','[\"https://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg\", \"https://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg\", \"https://camo.githubusercontent.com/788c0a7e11a\", \"https://camo.githubusercontent.com/f513f67\"]','2017-02-01 11:21:50'); +INSERT INTO `apijson_user`(`id`, `sex`, `name`, `tag`, `head`, `contactIdList`, `pictureList`, `date`) VALUES (82001,1,'Test User','dev','https://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000','[82034, 82005, 82030, 82046, 1493748615711, 38710, 82054, 82002]','[\"https://common.cnblogs.com/images/icon_weibo_24.png\"]','2017-02-01 11:21:50'); +INSERT INTO `apijson_user`(`id`, `sex`, `name`, `tag`, `head`, `contactIdList`, `pictureList`, `date`) VALUES (82002,1,'Jan','iOS','https://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000','[82005, 38710]','[]','2017-02-01 11:21:50'),(82003,0,'Wechat','test','https://common.cnblogs.com/images/wechat.png','[93793]','[]','2017-02-01 11:21:50'); +INSERT INTO `apijson_user`(`id`, `sex`, `name`, `tag`, `head`, `contactIdList`, `pictureList`, `date`) VALUES (82004,0,'Tommy','fasef','https://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000','[]','[]','2017-02-01 11:21:50'),(82005,1,'Jan','AG','https://avatars.githubusercontent.com/u/41146037?v=4','[82001, 38710, 1532439021068]','[]','2017-02-01 11:21:50'); +/*!40000 ALTER TABLE `apijson_user` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2024-06-16 0:37:20 From fe33c46007f152b618365c7b38c54f3c1732eb9e Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Sat, 1 Mar 2025 22:29:26 +0800 Subject: [PATCH 09/47] =?UTF-8?q?Java=EF=BC=9ADemo=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?CockroachDB-=E4=BA=91=E5=8E=9F=E7=94=9F=E5=88=86=E5=B8=83?= =?UTF-8?q?=E5=BC=8F=E9=AB=98=E5=8F=AF=E7=94=A8=E8=BD=BB=E6=9D=BE=E6=89=A9?= =?UTF-8?q?=E5=B1=95=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/apijson/demo/DemoSQLConfig.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java index 28434f8..1c2b5db 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java @@ -55,7 +55,8 @@ public DemoSQLConfig(RequestMethod method, String table) { static { DEFAULT_DATABASE = DATABASE_MYSQL; //TODO 默认数据库类型,改成你自己的。TiDB, MariaDB, OceanBase 这类兼容 MySQL 的可当做 MySQL 使用 - // DEFAULT_NAMESPACE = "root"; //TODO 默认数据库名/模式,改成你自己的,仅对 PostgreSQL: posgres, SurrealDB: root 等数据库有效 + // DEFAULT_NAMESPACE = "root"; //TODO 默认数据库名/模式,改成你自己的,仅对 SurrealDB: root 等数据库有效 + // DEFAULT_CATALOG = "postgres"; //TODO 默认数据库名/模式,改成你自己的,仅对 PostgreSQL: posgres 等数据库有效 DEFAULT_SCHEMA = "sys"; // "apijson"; //TODO 默认数据库名/模式,改成你自己的,默认情况是 MySQL: sys, PostgreSQL: sys, SQL Server: dbo, Oracle: // 表名和数据库不一致的,需要配置映射关系。只使用 APIJSONORM 时才需要; @@ -72,7 +73,7 @@ public DemoSQLConfig(RequestMethod method, String table) { SIMPLE_CALLBACK = new SimpleCallback() { @Override - public AbstractSQLConfig getSQLConfig(RequestMethod method, String database, String schema, String datasource, String table) { + public AbstractSQLConfig getSQLConfig(RequestMethod method, String database, String schema, String datasource, String table) { return new DemoSQLConfig(method, table); } @@ -215,9 +216,13 @@ public String getDBUri() { // 以下是 MySQL 5.7 及以下 return "jdbc:mysql://localhost:3306?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; //TODO 改成你自己的,TiDB 可以当成 MySQL 使用,默认端口为 4000 } - if (isPostgreSQL()) { + if (isPostgreSQL()) { // PG JDBC 必须在 URI 传 catalog return "jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"; //TODO 改成你自己的 } + //if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog + // return "jdbc:postgresql://localhost:26257/movr?sslmode=require"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach && cockroach demo + // //return "jdbc:postgresql://localhost:26258/postgres?sslmode=disable"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach # && start 3 nodes and init cluster + //} if (isSQLServer()) { return "jdbc:jtds:sqlserver://localhost:1433/pubs;instance=SQLEXPRESS"; //TODO 改成你自己的 } @@ -285,6 +290,10 @@ public String getDBAccount() { if (isPostgreSQL()) { return "postgres"; //TODO 改成你自己的 } + //if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog + // return "demo"; //TODO 改成你自己的 + // //return "postgres"; //TODO 改成你自己的 + //} if (isSQLServer()) { return "sa"; //TODO 改成你自己的 } @@ -350,6 +359,10 @@ public String getDBPassword() { if (isPostgreSQL()) { return null; //TODO 改成你自己的 } + //if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog + // return "demo39865"; //TODO 改成你自己的 + // //return null; //TODO 改成你自己的 + //} if (isSQLServer()) { return "apijson@123"; //TODO 改成你自己的 } From 0590709afcbb465d2d8a6270cd3a2b05bba9ccea Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Sun, 2 Mar 2025 12:01:09 +0800 Subject: [PATCH 10/47] =?UTF-8?q?Java=EF=BC=9ADemo=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?ManticoreSearch-=E6=9B=BF=E4=BB=A3=20Elasticsearch=20=E7=9A=84?= =?UTF-8?q?=E8=BD=BB=E9=87=8F=E7=BA=A7=E6=90=9C=E7=B4=A2=E5=BC=95=E6=93=8E?= =?UTF-8?q?=EF=BC=8C=E5=85=BC=E5=AE=B9=20MySQL=20=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/apijson/demo/DemoSQLConfig.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java index 1c2b5db..06a31de 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java @@ -248,6 +248,9 @@ public String getDBUri() { if (isMilvus()) { return "http://localhost:19530"; //TODO 改成你自己的 } + //if (isManticore()) { + // return "jdbc:mysql://localhost:3306?characterEncoding=utf8&maxAllowedPacket=512000"; //TODO 改成你自己的 + //} // if (isIoTDB()) { // return "jdbc:iotdb://localhost:6667"; // ?charset=GB18030 加参数会报错 URI 格式错误 //TODO 改成你自己的 // } @@ -318,6 +321,9 @@ public String getDBAccount() { if (isMilvus()) { return "root"; } + //if (isManticore()) { + // return "root"; + //} // if (isIoTDB()) { // return "root"; // } @@ -387,6 +393,9 @@ public String getDBPassword() { if (isMilvus()) { return "apijson"; //TODO 改成你自己的 } + //if (isManticore()) { + // return null; + //} // if (isIoTDB()) { // return "root"; // } From 1a88a7acd469cfd2f3cc3397ea02a424ea993dd6 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Mon, 3 Mar 2025 00:34:39 +0800 Subject: [PATCH 11/47] =?UTF-8?q?Java:=20ManticoreSearch=20=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=85=8D=E8=B4=A6=E5=8F=B7=E9=85=8D=E7=BD=AE=EF=BC=9B?= =?UTF-8?q?Manticore=EF=BC=9A=E6=9B=B4=E6=96=B0=E8=A1=A8=EF=BC=8Cdatabase?= =?UTF-8?q?=20=E4=BB=8E=E5=8F=AF=E8=83=BD=E5=88=9B=E5=BB=BA=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84=20sys=20=E6=94=B9=E4=B8=BA=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=9A=84=20Manticore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/apijson/demo/DemoSQLConfig.java | 7 ++++--- .../single/{sys_Comment.sql => Manticore_Comment.sql} | 0 Manticore/single/{sys_Moment.sql => Manticore_Moment.sql} | 0 .../{sys_apijson_user.sql => Manticore_apijson_user.sql} | 0 4 files changed, 4 insertions(+), 3 deletions(-) rename Manticore/single/{sys_Comment.sql => Manticore_Comment.sql} (100%) rename Manticore/single/{sys_Moment.sql => Manticore_Moment.sql} (100%) rename Manticore/single/{sys_apijson_user.sql => Manticore_apijson_user.sql} (100%) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java index 06a31de..6183345 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java @@ -57,7 +57,7 @@ public DemoSQLConfig(RequestMethod method, String table) { DEFAULT_DATABASE = DATABASE_MYSQL; //TODO 默认数据库类型,改成你自己的。TiDB, MariaDB, OceanBase 这类兼容 MySQL 的可当做 MySQL 使用 // DEFAULT_NAMESPACE = "root"; //TODO 默认数据库名/模式,改成你自己的,仅对 SurrealDB: root 等数据库有效 // DEFAULT_CATALOG = "postgres"; //TODO 默认数据库名/模式,改成你自己的,仅对 PostgreSQL: posgres 等数据库有效 - DEFAULT_SCHEMA = "sys"; // "apijson"; //TODO 默认数据库名/模式,改成你自己的,默认情况是 MySQL: sys, PostgreSQL: sys, SQL Server: dbo, Oracle: + DEFAULT_SCHEMA = "sys"; // "apijson"; //TODO 默认数据库名/模式,改成你自己的,默认情况是 MySQL: sys, PostgreSQL: sys, SQL Server: dbo, Manticore: Manticore, Oracle: // 表名和数据库不一致的,需要配置映射关系。只使用 APIJSONORM 时才需要; // 这个 Demo 用了 apijson-framework 且调用了 APIJSONApplication.init 则不需要 @@ -249,7 +249,7 @@ public String getDBUri() { return "http://localhost:19530"; //TODO 改成你自己的 } //if (isManticore()) { - // return "jdbc:mysql://localhost:3306?characterEncoding=utf8&maxAllowedPacket=512000"; //TODO 改成你自己的 + // return "jdbc:mysql://localhost:9306?characterEncoding=utf8&maxAllowedPacket=512000"; //TODO 改成你自己的 //} // if (isIoTDB()) { // return "jdbc:iotdb://localhost:6667"; // ?charset=GB18030 加参数会报错 URI 格式错误 //TODO 改成你自己的 @@ -322,7 +322,7 @@ public String getDBAccount() { return "root"; } //if (isManticore()) { - // return "root"; + // return null; // "root"; //} // if (isIoTDB()) { // return "root"; @@ -546,6 +546,7 @@ protected int getMaxCombineCount() { public String getSQLTable() { String t = super.getSQLTable(); return isInfluxDB() ? t.toLowerCase() : t; + //return isInfluxDB() || isManticore() ? t.toLowerCase() : t; // return isInfluxDB() || isIoTDB() ? t.toLowerCase() : t; // return isInfluxDB() ? t.toLowerCase() : StringUtil.firstCase(JSONRequest.recoverUnderline(t, false), false); } diff --git a/Manticore/single/sys_Comment.sql b/Manticore/single/Manticore_Comment.sql similarity index 100% rename from Manticore/single/sys_Comment.sql rename to Manticore/single/Manticore_Comment.sql diff --git a/Manticore/single/sys_Moment.sql b/Manticore/single/Manticore_Moment.sql similarity index 100% rename from Manticore/single/sys_Moment.sql rename to Manticore/single/Manticore_Moment.sql diff --git a/Manticore/single/sys_apijson_user.sql b/Manticore/single/Manticore_apijson_user.sql similarity index 100% rename from Manticore/single/sys_apijson_user.sql rename to Manticore/single/Manticore_apijson_user.sql From eaabc926860b2dc1a3fa1223746af116a90fc614 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Sun, 9 Mar 2025 22:21:02 +0800 Subject: [PATCH 12/47] =?UTF-8?q?Java:=20MultiDataSource=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20TimescaleDB-=E9=AB=98=E6=80=A7=E8=83=BD=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E5=88=86=E6=9E=90=E6=97=B6=E5=BA=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=20=E7=9A=84=E9=85=8D=E7=BD=AE=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/apijson/demo/DemoSQLConfig.java | 77 +++++++++++-------- 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java index 6183345..d3e7fee 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java @@ -164,9 +164,9 @@ public String getDBVersion() { if (isDb2()) { return "11.5"; //TODO 改成你自己的 } - // if (isSQLite()) { - // return "3.39.3"; //TODO 改成你自己的 - // } + // if (isSQLite()) { + // return "3.39.3"; //TODO 改成你自己的 + // } if (isDameng()) { return "8.1.2.141"; //TODO 改成你自己的 } @@ -212,17 +212,17 @@ public String getDBUri() { if (isMySQL()) { // 这个是 MySQL 8.0 及以上,要加 userSSL=false -// return "jdbc:mysql://47.122.25.116:3306?userSSL=false&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; + // return "jdbc:mysql://47.122.25.116:3306?userSSL=false&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; // 以下是 MySQL 5.7 及以下 return "jdbc:mysql://localhost:3306?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; //TODO 改成你自己的,TiDB 可以当成 MySQL 使用,默认端口为 4000 } if (isPostgreSQL()) { // PG JDBC 必须在 URI 传 catalog return "jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"; //TODO 改成你自己的 } - //if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog - // return "jdbc:postgresql://localhost:26257/movr?sslmode=require"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach && cockroach demo - // //return "jdbc:postgresql://localhost:26258/postgres?sslmode=disable"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach # && start 3 nodes and init cluster - //} + // if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog + // return "jdbc:postgresql://localhost:26257/movr?sslmode=require"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach && cockroach demo + // // return "jdbc:postgresql://localhost:26258/postgres?sslmode=disable"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach # && start 3 nodes and init cluster + // } if (isSQLServer()) { return "jdbc:jtds:sqlserver://localhost:1433/pubs;instance=SQLEXPRESS"; //TODO 改成你自己的 } @@ -232,9 +232,9 @@ public String getDBUri() { if (isDb2()) { return "jdbc:db2://localhost:50000/BLUDB"; //TODO 改成你自己的 } - //if (isSQLite()) { - // return "jdbc:sqlite:sample.db"; //TODO 改成你自己的 - //} + // if (isSQLite()) { + // return "jdbc:sqlite:sample.db"; //TODO 改成你自己的 + // } if (isDameng()) { return "jdbc:dm://localhost:5236"; //TODO 改成你自己的 } @@ -242,15 +242,18 @@ public String getDBUri() { // return "jdbc:TAOS://localhost:6030"; //TODO 改成你自己的 return "jdbc:TAOS-RS://localhost:6041"; //TODO 改成你自己的 } + // if (isTimescaleDB()) { // PG JDBC 必须在 URI 传 catalog + // return "jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"; //TODO 改成你自己的 + // } if (isInfluxDB()) { return "http://203.189.6.3:8086"; //TODO 改成你自己的 } if (isMilvus()) { return "http://localhost:19530"; //TODO 改成你自己的 } - //if (isManticore()) { - // return "jdbc:mysql://localhost:9306?characterEncoding=utf8&maxAllowedPacket=512000"; //TODO 改成你自己的 - //} + // if (isManticore()) { + // return "jdbc:mysql://localhost:9306?characterEncoding=utf8&maxAllowedPacket=512000"; //TODO 改成你自己的 + // } // if (isIoTDB()) { // return "jdbc:iotdb://localhost:6667"; // ?charset=GB18030 加参数会报错 URI 格式错误 //TODO 改成你自己的 // } @@ -293,10 +296,10 @@ public String getDBAccount() { if (isPostgreSQL()) { return "postgres"; //TODO 改成你自己的 } - //if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog - // return "demo"; //TODO 改成你自己的 - // //return "postgres"; //TODO 改成你自己的 - //} + // if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog + // return "demo"; //TODO 改成你自己的 + // //return "postgres"; //TODO 改成你自己的 + // } if (isSQLServer()) { return "sa"; //TODO 改成你自己的 } @@ -306,24 +309,27 @@ public String getDBAccount() { if (isDb2()) { return "db2admin"; //TODO 改成你自己的 } - //if (isSQLite()) { - // return "root"; //TODO 改成你自己的 - //} + // if (isSQLite()) { + // return "root"; //TODO 改成你自己的 + // } if (isDameng()) { return "SYSDBA"; } if (isTDengine()) { return "root"; //TODO 改成你自己的 } + // if (isTimescaleDB()) { + // return "postgres"; //TODO 改成你自己的 + // } if (isInfluxDB()) { return "iotos"; } if (isMilvus()) { return "root"; } - //if (isManticore()) { - // return null; // "root"; - //} + // if (isManticore()) { + // return null; // "root"; + // } // if (isIoTDB()) { // return "root"; // } @@ -365,10 +371,10 @@ public String getDBPassword() { if (isPostgreSQL()) { return null; //TODO 改成你自己的 } - //if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog - // return "demo39865"; //TODO 改成你自己的 - // //return null; //TODO 改成你自己的 - //} + // if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog + // return "demo39865"; //TODO 改成你自己的 + // // return null; //TODO 改成你自己的 + // } if (isSQLServer()) { return "apijson@123"; //TODO 改成你自己的 } @@ -378,24 +384,27 @@ public String getDBPassword() { if (isDb2()) { return "123"; //TODO 改成你自己的 } - // if (isSQLite()) { - // return "apijson"; //TODO 改成你自己的 - // } + // if (isSQLite()) { + // return "apijson"; //TODO 改成你自己的 + // } if (isDameng()) { return "SYSDBA"; } if (isTDengine()) { return "taosdata"; //TODO 改成你自己的 } + // if (isTimescaleDB()) { + // return "password"; //TODO 改成你自己的 + // } if (isInfluxDB()) { return "apijson@123"; //TODO 改成你自己的 } if (isMilvus()) { return "apijson"; //TODO 改成你自己的 } - //if (isManticore()) { - // return null; - //} + // if (isManticore()) { + // return null; + // } // if (isIoTDB()) { // return "root"; // } From e1f09e36ecb552782b1bef39d2767e27e645d87c Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Sun, 16 Mar 2025 01:54:48 +0800 Subject: [PATCH 13/47] =?UTF-8?q?Java:=20MultiDataSource=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20QuestDB-=E9=AB=98=E6=80=A7=E8=83=BD=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E5=88=86=E6=9E=90=E6=97=B6=E5=BA=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=20=E7=9A=84=E9=85=8D=E7=BD=AE=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/apijson/demo/DemoSQLConfig.java | 9 + QuestDB/single/qdb_public_Comment.sql | 545 ++++++++++++++++++ QuestDB/single/qdb_public_Moment.sql | 224 +++++++ QuestDB/single/qdb_public_apijson_user.sql | 154 +++++ 4 files changed, 932 insertions(+) create mode 100644 QuestDB/single/qdb_public_Comment.sql create mode 100644 QuestDB/single/qdb_public_Moment.sql create mode 100644 QuestDB/single/qdb_public_apijson_user.sql diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java index d3e7fee..ca7d71c 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java @@ -245,6 +245,9 @@ public String getDBUri() { // if (isTimescaleDB()) { // PG JDBC 必须在 URI 传 catalog // return "jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"; //TODO 改成你自己的 // } + // if (isQuestDB()) { // PG JDBC 必须在 URI 传 catalog + // return "jdbc:postgresql://localhost:8812/qdb"; //TODO 改成你自己的 + // } if (isInfluxDB()) { return "http://203.189.6.3:8086"; //TODO 改成你自己的 } @@ -321,6 +324,9 @@ public String getDBAccount() { // if (isTimescaleDB()) { // return "postgres"; //TODO 改成你自己的 // } + // if (isQuestDB()) { + // return "admin"; //TODO 改成你自己的 + // } if (isInfluxDB()) { return "iotos"; } @@ -396,6 +402,9 @@ public String getDBPassword() { // if (isTimescaleDB()) { // return "password"; //TODO 改成你自己的 // } + // if (isQuestDB()) { + // return "quest"; //TODO 改成你自己的 + // } if (isInfluxDB()) { return "apijson@123"; //TODO 改成你自己的 } diff --git a/QuestDB/single/qdb_public_Comment.sql b/QuestDB/single/qdb_public_Comment.sql new file mode 100644 index 0000000..68407bf --- /dev/null +++ b/QuestDB/single/qdb_public_Comment.sql @@ -0,0 +1,545 @@ +create table "Comment" +( + date timestamp(, + id bigint not null, + "toId" bigint not null, + "userId" bigint not null, + "momentId" bigint not null, + content varchar not null +); + + +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (4, 0, 38710, 470, '2017-02-01 11:20:50.000000', 'This is a Content...-4'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (13, 0, 82005, 58, '2017-02-01 11:20:50.000000', 'This is a Content...-13'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (22, 221, 82001, 470, '2017-02-01 11:20:50.000000', '测试修改评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (44, 0, 82003, 170, '2017-02-01 11:20:50.000000', 'This is a Content...-44'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (45, 0, 93793, 301, '2017-02-01 11:20:50.000000', 'This is a Content...-45'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (47, 4, 70793, 470, '2017-02-01 11:20:50.000000', 'This is a Content...-47'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (51, 45, 82003, 301, '2017-02-01 11:20:50.000000', 'This is a Content...-51'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (54, 0, 82004, 170, '2017-02-01 11:20:50.000000', 'This is a Content...-54'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (68, 0, 82005, 371, '2017-02-01 11:20:50.000000', 'This is a Content...-68'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (76, 45, 93793, 301, '2017-02-01 11:20:50.000000', 'This is a Content...-76'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (77, 13, 93793, 58, '2017-02-01 11:20:50.000000', 'This is a Content...-77'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (97, 13, 82006, 58, '2017-02-01 11:20:50.000000', 'This is a Content...-97'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (99, 44, 70793, 170, '2017-02-01 11:20:50.000000', 'This is a Content...-99'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (110, 0, 93793, 371, '2017-02-01 11:23:24.000000', 'This is a Content...-110'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (114, 0, 82001, 371, '2017-03-02 05:56:06.000000', 'This is a Content...-114'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (115, 0, 38710, 371, '2017-03-02 05:56:06.000000', 'This is a Content...-115'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (116, 0, 70793, 371, '2017-03-02 05:56:06.000000', 'This is a Content...-116'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (120, 0, 93793, 301, '2017-03-02 05:56:06.000000', 'This is a Content...-110'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (124, 0, 82001, 301, '2017-03-02 05:56:06.000000', 'This is a Content...-114'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (157, 0, 93793, 371, '2017-02-01 11:20:50.000000', 'This is a Content...-157'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (158, 0, 93793, 301, '2018-07-12 17:28:23.000000', 'This is a Content...-157'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (160, 0, 82001, 235, '2017-03-02 05:56:06.000000', 'This is a Content...-160'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (162, 0, 93793, 12, '2017-03-06 05:03:45.000000', 'This is a Content...-162'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (163, 0, 82001, 235, '2017-03-02 05:56:06.000000', 'This is a Content...-163'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (164, 0, 93793, 12, '2017-03-06 05:03:45.000000', 'This is a Content...-164'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (167, 0, 82001, 58, '2017-03-25 11:48:41.000000', 'Nice!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (168, 1490442545077, 82001, 235, '2017-03-25 11:49:14.000000', '???'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (172, 162, 82001, 12, '2017-03-25 12:22:58.000000', 'OK'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (173, 0, 38710, 58, '2017-03-25 12:25:13.000000', 'Good'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (175, 0, 38710, 12, '2017-03-25 12:26:53.000000', 'Java is the best program language!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (176, 166, 38710, 15, '2017-03-25 12:28:03.000000', 'thank you'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (178, 0, 38710, 511, '2017-03-25 12:30:55.000000', 'wbw'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (182, 110, 82001, 371, '2017-03-26 06:12:52.000000', 'hahaha'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (188, 97, 82001, 58, '2017-03-26 07:21:32.000000', '1646'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (190, 0, 82001, 58, '2017-03-26 07:22:13.000000', 'dbdj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (206, 54, 82001, 170, '2017-03-29 03:04:23.000000', 'ejej'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (209, 13, 82001, 58, '2017-03-29 03:05:59.000000', 'hehj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (300, 97, 82001, 58, '2017-03-29 03:06:07.000000', 'hj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (301, 194, 82001, 235, '2017-03-29 03:06:24.000000', 'jj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (4001, 0, 82001, 58, '2017-03-29 08:39:52.000000', 'I would like to say …'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490776944301, 0, 82001, 58, '2017-03-29 08:42:24.000000', 'hello'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490776966828, 173, 82001, 58, '2017-03-29 08:42:46.000000', 'me too'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490777905437, 0, 82001, 543, '2017-03-29 08:58:25.000000', 'rr'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490778122719, 175, 82001, 12, '2017-03-29 09:02:02.000000', 'Yeah! I think so!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490778494751, 1490778122719, 82001, 12, '2017-03-29 09:08:14.000000', 'reply Android82001'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490778681337, 166, 82001, 12, '2017-03-29 09:11:21.000000', 'gg'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490780759866, 99, 82001, 170, '2017-03-29 09:45:59.000000', '99'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490781009548, 51, 82001, 301, '2017-03-29 09:50:09.000000', '3'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490781032005, 45, 82001, 301, '2017-03-29 09:50:32.000000', '93793'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490781817044, 209, 38710, 58, '2017-03-29 10:03:37.000000', '82001'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490781850893, 1490776966828, 38710, 58, '2017-03-29 10:04:10.000000', 'haha!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490781857242, 190, 38710, 58, '2017-03-29 10:04:17.000000', 'nice'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490781865407, 1490781857242, 38710, 58, '2017-03-29 10:04:25.000000', 'wow'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490781899147, 197, 38710, 12, '2017-03-29 10:04:59.000000', 'kaka'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490794439561, 1490778681337, 82001, 12, '2017-03-29 13:33:59.000000', 'gg?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490794610632, 172, 82001, 12, '2017-03-29 13:36:50.000000', 'All right'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490794937137, 1490794919957, 82001, 12, '2017-03-29 13:42:17.000000', 'All right ok ok'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490794953438, 1490794937137, 82001, 12, '2017-03-29 13:42:33.000000', 'All right ok ok ll'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490796241178, 0, 38710, 58, '2017-03-29 14:04:01.000000', 'Anything else?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490796629591, 175, 38710, 12, '2017-03-29 14:10:29.000000', 'well'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490798710678, 110, 38710, 371, '2017-03-29 14:45:10.000000', '110'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490800971064, 175, 38710, 12, '2017-03-29 15:22:51.000000', 'I do'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490848396072, 175, 82001, 12, '2017-03-30 04:33:16.000000', 'Lemon'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490848581424, 166, 82001, 12, '2017-03-30 04:36:21.000000', '82001ejej'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490850764448, 162, 82001, 12, '2017-03-30 05:12:44.000000', '-162'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490850844016, 0, 82001, 12, '2017-03-30 05:14:04.000000', 'I like it'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490850876656, 1490800971064, 82001, 12, '2017-03-30 05:14:36.000000', 'I do so'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490854894566, 175, 82001, 12, '2017-03-30 06:21:34.000000', 'it does be a good lang'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863443219, 1490850844016, 82002, 12, '2017-03-30 08:44:03.000000', 'me too!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863469638, 0, 82002, 15, '2017-03-30 08:44:29.000000', 'Just do it'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863507114, 4, 82003, 470, '2017-03-30 08:45:07.000000', 'yes'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863563124, 0, 82003, 704, '2017-03-30 08:46:03.000000', 'I want one'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863651493, 0, 70793, 595, '2017-03-30 08:47:31.000000', 'wow'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863661426, 1490780759866, 70793, 170, '2017-03-30 08:47:41.000000', '66'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863676989, 0, 70793, 12, '2017-03-30 08:47:56.000000', 'Shy'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863711703, 0, 70793, 511, '2017-03-30 08:48:31.000000', 'I hope I can join'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863717947, 178, 70793, 511, '2017-03-30 08:48:37.000000', 'what?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863783276, 1490863711703, 93793, 511, '2017-03-30 08:49:43.000000', 'haha welcome'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863903900, 0, 82006, 470, '2017-03-30 08:51:43.000000', 'SOGA'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863915675, 0, 82006, 235, '2017-03-30 08:51:55.000000', 'Good boy'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863938712, 0, 82006, 12, '2017-03-30 08:52:18.000000', 'Handsome!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490863978239, 1490796241178, 82006, 58, '2017-03-30 08:52:58.000000', 'there still remains a question…'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490864016738, 0, 82006, 511, '2017-03-30 08:53:36.000000', 'I want to have a try!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490864023700, 0, 82006, 543, '2017-03-30 08:53:43.000000', 'oops'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490864039264, 0, 82006, 551, '2017-03-30 08:53:59.000000', 'Wonderful!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490864152008, 0, 82006, 58, '2017-03-30 08:55:52.000000', 'U R ugly( ´?` )'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490864254400, 1490863915675, 82044, 235, '2017-03-30 08:57:34.000000', 'And I have no idea'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490864276824, 0, 82044, 12, '2017-03-30 08:57:56.000000', 'Oh my God!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490864292184, 1490864152008, 82044, 58, '2017-03-30 08:58:12.000000', 'haha!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490864379424, 1490863938712, 82001, 12, '2017-03-30 08:59:39.000000', 'Thank you~'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490864400210, 1490864276824, 82001, 12, '2017-03-30 09:00:00.000000', 'Amazing, isnt it?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490874908570, 1490864023700, 82055, 543, '2017-03-30 11:55:08.000000', 'yeah'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490874930994, 1490777905437, 82055, 543, '2017-03-30 11:55:30.000000', 'yy'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490874968779, 0, 82055, 12, '2017-03-30 11:56:08.000000', 'I love it'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490875033494, 0, 82055, 301, '2017-03-30 11:57:13.000000', 'More Comments'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490875040761, 158, 82055, 301, '2017-03-30 11:57:20.000000', '157'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490875046704, 120, 82055, 301, '2017-03-30 11:57:26.000000', '110'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490875660259, 1490863469638, 82055, 15, '2017-03-30 12:07:40.000000', 'I prove wht you said(??????)'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490879678127, 0, 82001, 543, '2017-03-30 13:14:38.000000', 'Baby you are a firework!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490973736662, 1490973715568, 70793, 170, '2017-03-31 15:22:16.000000', 'Hello, I am a fresh man'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1490973890875, 1490864039264, 93793, 551, '2017-03-31 15:24:50.000000', 'While I donot think so…'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491014830404, 1490864016738, 82001, 511, '2017-04-01 02:47:10.000000', 'Have a nice day!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491119615611, 1490864023700, 82001, 543, '2017-04-02 07:53:35.000000', '$$'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491119670185, 68, 82001, 371, '2017-04-02 07:54:30.000000', 'Leave a word'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491119695580, 0, 82001, 371, '2017-04-02 07:54:55.000000', 'leave a word'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491130701902, 0, 38710, 511, '2017-04-02 10:58:21.000000', 'Thanks for your supports (-^?^-)'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491209763162, 0, 82001, 1491200468898, '2017-04-03 08:56:03.000000', 'How do you do'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491277552385, 0, 82001, 58, '2017-04-04 03:45:52.000000', 'Seven'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491312438951, 1490863651493, 82001, 595, '2017-04-04 13:27:18.000000', 'WaKaKa!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491709064513, 0, 82001, 551, '2017-04-09 03:37:44.000000', 'soga'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491740899179, 0, 82001, 470, '2017-04-09 12:28:19.000000', 'www'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491798370749, 0, 82002, 551, '2017-04-10 04:26:10.000000', 'Nice!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491798499667, 115, 82002, 371, '2017-04-10 04:28:19.000000', 'I do not understand…'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1491830543193, 0, 82001, 170, '2017-04-10 13:22:23.000000', 'What is the hell?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1492932228287, 1491209763162, 38710, 1491200468898, '2017-04-23 07:23:48.000000', 'fine,thanks'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1493094307810, 0, 82001, 551, '2017-04-25 04:25:04.000000', '删除或修改数据请先创建,不要动原来的,谢谢'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1493094307910, 0, 82001, 551, '2017-04-25 04:26:04.000000', '用POST新增数据'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1493186363132, 1490850764448, 82001, 12, '2017-04-26 05:59:23.000000', 'sndnd'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1502632433970, 0, 82002, 1493835799335, '2017-08-13 13:53:53.000000', 'just have fun!'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1508053783278, 0, 82001, 1508053762227, '2017-10-15 07:49:43.000000', '可以的'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1508072695833, 0, 82003, 1508072633830, '2017-10-15 13:04:55.000000', '心疼地抱住自己(๑´ㅂ`๑)'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1508227456407, 0, 82001, 15, '2017-10-17 08:04:16.000000', 'hsh'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1508227498578, 1491798370749, 82001, 551, '2017-10-17 08:04:58.000000', 'g'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1508462026394, 1490850844016, 82001, 12, '2017-10-20 01:13:46.000000', '欧'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1508492585904, 1508462026394, 82001, 12, '2017-10-20 09:43:05.000000', 'my god'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1509003045509, 0, 82001, 1508072633830, '2017-10-26 07:30:45.000000', 'hhh'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1509346549158, 0, 82001, 170, '2017-10-30 06:55:49.000000', '呵呵'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1509346556395, 0, 82001, 170, '2017-10-30 06:55:56.000000', '测试'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1509346606036, 0, 82001, 15, '2017-10-30 06:56:46.000000', '测'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1509518079106, 0, 82001, 1508073178489, '2017-11-01 06:34:39.000000', '哦哦哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1510795816462, 162, 82001, 12, '2017-11-16 01:30:16.000000', '赞'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1510795933629, 0, 82001, 1508073178489, '2017-11-16 01:32:13.000000', 'cc'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1510813284894, 0, 82001, 12, '2017-11-16 06:21:24.000000', 'asdasdasdas'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1510813295700, 162, 82001, 12, '2017-11-16 06:21:35.000000', 'adsdasdasdasd'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1511374269759, 99, 82001, 170, '2017-11-22 18:11:09.000000', '记录里'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1511374274194, 0, 82001, 170, '2017-11-22 18:11:14.000000', '哦哦哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1511407695342, 0, 1511407581570, 371, '2017-11-23 03:28:15.000000', '好的'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1511407702981, 157, 1511407581570, 371, '2017-11-23 03:28:22.000000', '你好'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1511878024415, 0, 1511761906715, 12, '2017-11-28 14:07:04.000000', '你今年'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1511878031610, 1511878024415, 1511761906715, 12, '2017-11-28 14:07:11.000000', '不鸟你'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1512035094555, 0, 82001, 12, '2017-11-30 09:44:54.000000', '呵呵呵'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1512035117021, 0, 82001, 32, '2017-11-30 09:45:17.000000', '图片看不了啊'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1512039030970, 1512035117021, 82001, 32, '2017-11-30 10:50:30.000000', '一般九宫格图片都是压缩图,分辨率在300*300左右,加载很快,点击放大后才是原图,1080P左右'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1512531859019, 0, 1512531601485, 1512314438990, '2017-12-06 03:44:19.000000', '666'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1512533520832, 1512531859019, 38710, 1512314438990, '2017-12-06 04:12:00.000000', '嘿嘿'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1513656045399, 0, 82001, 1508072633830, '2017-12-19 04:00:45.000000', '444444'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514425796195, 0, 82001, 1513094436910, '2017-12-28 01:49:56.000000', '一起'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514473034425, 1514425796195, 93793, 1513094436910, '2017-12-28 14:57:14.000000', '干啥?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514478784653, 0, 82001, 1513094436910, '2017-12-28 16:33:04.000000', 'bug很多'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514506206319, 1514478784653, 38710, 1513094436910, '2017-12-29 00:10:06.000000', '碰到哪些了呢?欢迎指出,尽快解决^_^'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514617131036, 0, 82005, 1513094436910, '2017-12-30 06:58:51.000000', '口子'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514858592813, 0, 82001, 1514858533480, '2018-01-02 02:03:12.000000', '铁人'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514858640958, 0, 38710, 1514858533480, '2018-01-02 02:04:00.000000', '斯塔克工业'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514858707767, 0, 70793, 1514858533480, '2018-01-02 02:05:07.000000', '壕友乎?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514960713300, 0, 82001, 1513094436910, '2018-01-03 06:25:13.000000', '1'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1514960744185, 1512531859019, 82001, 1512314438990, '2018-01-03 06:25:44.000000', '哇'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1515057852156, 0, 82001, 58, '2018-01-04 09:24:12.000000', '你说'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1515057857464, 0, 82001, 58, '2018-01-04 09:24:17.000000', '你说'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1515057861094, 0, 82001, 58, '2018-01-04 09:24:21.000000', '蓉蓉'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1515057864174, 1515057857464, 82001, 58, '2018-01-04 09:24:24.000000', '哦轻松'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1515057869554, 0, 82001, 58, '2018-01-04 09:24:29.000000', ',王者荣耀'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1515313792063, 162, 82001, 12, '2018-01-07 08:29:52.000000', 'you'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1515313823155, 164, 82001, 12, '2018-01-07 08:30:23.000000', 'you'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516190557098, 0, 82001, 1513094436910, '2018-01-17 12:02:37.000000', '哦婆婆'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516629533520, 0, 82001, 1508072633830, '2018-01-22 13:58:53.000000', '小臭臭'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516686985310, 0, 82001, 1516086423441, '2018-01-23 05:56:25.000000', 'hologram'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516687072270, 1516629533520, 82001, 1508072633830, '2018-01-23 05:57:52.000000', '咯我就'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516687437251, 1516686985310, 82001, 1516086423441, '2018-01-23 06:03:57.000000', '你家里好哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516691119239, 1516686985310, 38710, 1516086423441, '2018-01-23 07:05:19.000000', '我喜欢Hololens嘿嘿'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516780129884, 0, 82001, 1516086423441, '2018-01-24 07:48:49.000000', 'aaa'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516783920998, 0, 82001, 1513094436910, '2018-01-24 08:52:00.000000', '这个是实时的吗'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516785657724, 0, 82001, 1516086423441, '2018-01-24 09:20:57.000000', 'hj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516805226757, 1516785657724, 38710, 1516086423441, '2018-01-24 14:47:06.000000', '滑稽?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516805340593, 1516783920998, 38710, 1513094436910, '2018-01-24 14:49:00.000000', '看怎么定义 实时 。这个是仿微信朋友圈列表和QQ空间说说详情,在线同步的,但没做推送,所以不是QQ微信聊天那种即时通讯。'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516843720270, 1516780129884, 82001, 1516086423441, '2018-01-25 01:28:40.000000', 'ghj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516862537978, 1515057869554, 70793, 58, '2018-01-25 06:42:17.000000', '绝地逃亡吃鸡'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516931850067, 0, 82001, 1516086423441, '2018-01-26 01:57:30.000000', '1111111111111'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516951734010, 1514506206319, 82001, 1513094436910, '2018-01-26 07:28:54.000000', '火锅'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516951754620, 0, 82001, 1513094436910, '2018-01-26 07:29:14.000000', '凤飞飞刚刚好'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1516951826863, 0, 82001, 170, '2018-01-26 07:30:26.000000', '黑珍珠'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1517193267472, 1513656045399, 82001, 1508072633830, '2018-01-29 02:34:27.000000', '1'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1517193278459, 0, 82001, 1508072633830, '2018-01-29 02:34:38.000000', '112'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1517229342303, 0, 82001, 1516086423441, '2018-01-29 12:35:42.000000', '几号抢的'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1517234768450, 1517229342303, 93793, 1516086423441, '2018-01-29 14:06:08.000000', '9号'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1517303775429, 1490863903900, 82001, 470, '2018-01-30 09:16:15.000000', '???'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1517375165233, 0, 82001, 1508053762227, '2018-01-31 05:06:05.000000', '666'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1517730034960, 0, 82001, 170, '2018-02-04 07:40:34.000000', '陌陌陌陌'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1518365470893, 44, 82001, 170, '2018-02-11 16:11:10.000000', '野蜂飞舞'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1518614899681, 0, 82001, 301, '2018-02-14 13:28:19.000000', 'https://goo.gl/search/JJB+Sports +JJB Sports,'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1519719341810, 0, 82001, 1516086423441, '2018-02-27 08:15:41.000000', '我也想抢一张'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1519793574249, 1519719341810, 93793, 1516086423441, '2018-02-28 04:52:54.000000', '哈哈,春运都过了啊'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1519813825959, 0, 82001, 1516086423441, '2018-02-28 10:30:25.000000', '距P民'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1519974842508, 0, 82001, 1516086423441, '2018-03-02 07:14:02.000000', '1111'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1519974868848, 1516691119239, 82001, 1516086423441, '2018-03-02 07:14:28.000000', '1111'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1519979533242, 0, 82001, 1508072633830, '2018-03-02 08:32:13.000000', 'hj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1520231250819, 0, 82001, 12, '2018-03-05 06:27:30.000000', '浑身难受呢'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1520264640815, 0, 70793, 1520242333325, '2018-03-05 15:44:00.000000', '兰博基尼'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1520330788006, 0, 1520242280259, 1514017444961, '2018-03-06 10:06:28.000000', '八组'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1520578883309, 0, 82001, 12, '2018-03-09 07:01:23.000000', '我用流量'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1520699466219, 1520578883309, 82001, 12, '2018-03-10 16:31:06.000000', '壕'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1522074343188, 1513656045399, 82001, 1508072633830, '2018-03-26 14:25:43.000000', 'rrrrr'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1522074360206, 1519979533242, 82001, 1508072633830, '2018-03-26 14:26:00.000000', 'tttt'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1522657767636, 120, 82001, 301, '2018-04-02 08:29:27.000000', '云画'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1522741138316, 1517193278459, 82001, 1508072633830, '2018-04-03 07:38:58.000000', '哦哦哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1522986959852, 1508072695833, 82001, 1508072633830, '2018-04-06 03:55:59.000000', '!????'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1523936378484, 0, 1523935772553, 1523936332614, '2018-04-17 03:39:38.000000', '不错不错哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524032180807, 1519719341810, 82001, 1516086423441, '2018-04-18 06:16:20.000000', '你好啊'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524032244441, 1519974842508, 82001, 1516086423441, '2018-04-18 06:17:24.000000', '干嘛,单身吗?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524032255755, 1519974842508, 82001, 1516086423441, '2018-04-18 06:17:35.000000', '单身到底吗?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524032299622, 0, 82001, 1516086423441, '2018-04-18 06:18:19.000000', '别给我得怂'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524032305810, 1524032299622, 82001, 1516086423441, '2018-04-18 06:18:25.000000', '你好'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524178495587, 0, 1524042900591, 1524178455305, '2018-04-19 22:54:55.000000', '嘻嘻'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524178500568, 1524178495587, 1524042900591, 1524178455305, '2018-04-19 22:55:00.000000', '哈哈哈'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524190367904, 0, 38710, 1524178455305, '2018-04-20 02:12:47.000000', '你头像用的是本地的路径,只有你能看到,别人看不到哦,可以换一个url'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524190412418, 1524190367904, 38710, 1524178455305, '2018-04-20 02:13:32.000000', '我的资料>编辑>改下备注'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524190941111, 1524032244441, 82003, 1516086423441, '2018-04-20 02:22:21.000000', '单身约吗?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524190981549, 1522657767636, 82003, 301, '2018-04-20 02:23:01.000000', '这个6'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524191012552, 0, 82003, 1524178455305, '2018-04-20 02:23:32.000000', '早上好小姐姐'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524214012015, 1524190367904, 1524042900591, 1524178455305, '2018-04-20 08:46:52.000000', '怎么换url'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524235902970, 1524214012015, 82003, 1524178455305, '2018-04-20 14:51:42.000000', '在我的资料界面编辑备注'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524297798490, 0, 82001, 1513094436910, '2018-04-21 08:03:18.000000', 'gg'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524461430874, 1519979533242, 82001, 1508072633830, '2018-04-23 05:30:30.000000', '哦哦哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524461436914, 0, 82001, 1508072633830, '2018-04-23 05:30:36.000000', '莫'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524461441914, 0, 82001, 1508072633830, '2018-04-23 05:30:41.000000', '默默'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524488068926, 1524178500568, 82001, 1524178455305, '2018-04-23 12:54:28.000000', '哦哦哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524582671132, 1524461441914, 82003, 1508072633830, '2018-04-24 15:11:11.000000', '陌陌'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524582716289, 1524461441914, 70793, 1508072633830, '2018-04-24 15:11:56.000000', '脉脉'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524798402799, 0, 1523626157302, 1524178455305, '2018-04-27 03:06:42.000000', '能不能把本地的图片传到服务器,这样大家都能看到了,用url换头像不太习惯'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524799118232, 0, 1523626157302, 1512314438990, '2018-04-27 03:18:38.000000', '这些图片是怎么发上去的呢?我发动态只有默认的两张图'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524843908458, 1524799118232, 82001, 1512314438990, '2018-04-27 15:45:08.000000', '在HttpRequest.addMoment中加的,因为APIJSON的Server Demo没做图片存储,所以目前只能自己传图片的url,可以百度图片上找哈'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524844181029, 1524798402799, 82001, 1524178455305, '2018-04-27 15:49:41.000000', '确实有这样的问题,但这个Demo仅供展示APIJSON的接口数据增删改查的能力,又拍云,七牛等平台又需要对接及付费,所以Demo暂时不提供哈,需要的话可以自己搞。建议先把图片上传到又拍云等平台,拿回url再传到自己的服务器^_^'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1524844222775, 1524798402799, 82001, 1524178455305, '2018-04-27 15:50:22.000000', '目前也可以百度一张图,把对应的url传上去,大家就都能看到了哈哈'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1525658333654, 0, 82001, 1513094436910, '2018-05-07 01:58:53.000000', 'q'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1527821844576, 0, 1527821445610, 1527821296110, '2018-06-01 02:57:24.000000', '好不好用啊'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1527821876802, 1527821844576, 1527495857924, 1527821296110, '2018-06-01 02:57:56.000000', '当然好用啊'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1527837906576, 0, 38710, 1527830331780, '2018-06-01 07:25:06.000000', '哇,好漂亮'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1527837965006, 0, 82002, 1527830474378, '2018-06-01 07:26:05.000000', '像平板电脑哈哈'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1527862540820, 0, 1527495857924, 1527830331780, '2018-06-01 14:15:40.000000', '谢谢你'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1527862609352, 1527837965006, 1527495857924, 1527830474378, '2018-06-01 14:16:49.000000', 'ㄟ(≧◇≦)ㄏ'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528105592852, 0, 82001, 1516086423441, '2018-06-04 09:46:32.000000', 'aaaaa'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528250648974, 0, 82001, 1523936332614, '2018-06-06 02:04:08.000000', 'hshdv'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528270188205, 0, 1528250827953, 1527830474378, '2018-06-06 07:29:48.000000', '这个图片是怎么发出来的啊,我发动态就只是那两张默认图片'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528278187969, 0, 82001, 470, '2018-06-06 09:43:07.000000', '啊啊啊啊'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528289446172, 0, 82001, 1528269988360, '2018-06-06 12:50:46.000000', '因为没做前端上传和后端保存图片的功能,APIJSONApp主要是用来展示APIJSON的自动化接口的'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528289580140, 0, 38710, 1528274037224, '2018-06-06 12:53:00.000000', '这两张图片的url错了哦,都是网页url,所以小图加载不出来,只能点击后用WebView查看'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528327885509, 1528289580140, 1528250827953, 1528274037224, '2018-06-06 23:31:25.000000', '噢噢,没想到你能这么快回复,谢谢'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528333168328, 0, 82001, 1514017444961, '2018-06-07 00:59:28.000000', 'zj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528333174811, 0, 82001, 1514017444961, '2018-06-07 00:59:34.000000', 'xj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528393204569, 1528270188205, 38710, 1527830474378, '2018-06-07 17:40:04.000000', '把接口里的pictureList的值改下,里面包含图片url'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528463152459, 1528463135762, 1528339692804, 1528462217322, '2018-06-08 13:05:52.000000', '我想去'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528463165903, 0, 1528339692804, 1528462217322, '2018-06-08 13:06:05.000000', '我想去'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528516951218, 0, 82001, 1528462217322, '2018-06-09 04:02:31.000000', '这里能约到小姐姐算我输୧(๑•̀⌄•́๑)૭'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528554476310, 0, 82001, 1516086423441, '2018-06-09 14:27:56.000000', 'thS'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528676480604, 0, 1528339692804, 1528356421201, '2018-06-11 00:21:20.000000', 'nihshs'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528677257985, 0, 1528339692804, 1528676875139, '2018-06-11 00:34:17.000000', 'aaa'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528679814166, 0, 1528339692804, 1528676875139, '2018-06-11 01:16:54.000000', '12'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528681265496, 1528516951218, 1528339692804, 1528462217322, '2018-06-11 01:41:05.000000', '你输了有什么惩罚吗?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528698907535, 0, 82001, 1516086423441, '2018-06-11 06:35:07.000000', 'yhbv'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528703971675, 1528681265496, 82001, 1528462217322, '2018-06-11 07:59:31.000000', '一起陪小姐姐出游*。٩(ˊωˋ*)و✧'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528799506317, 1516805340593, 82001, 1513094436910, '2018-06-12 10:31:46.000000', '摩恩'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528972547638, 0, 82001, 1528462217322, '2018-06-14 10:35:47.000000', '古古怪怪'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1528972555336, 0, 82001, 1528462217322, '2018-06-14 10:35:55.000000', '合计怕v就怕vi'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1529730035521, 0, 82001, 1527830331780, '2018-06-23 05:00:35.000000', '还有别的吗?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1530528524447, 0, 38710, 1528269988360, '2018-07-02 10:48:44.000000', '所以HttpRequest里写死了两张图片url,你可以改下'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1531063660028, 0, 82003, 1531062713966, '2018-07-08 15:27:40.000000', '这是哪里啊?我也想去'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1531412238453, 0, 82001, 1528356378455, '2018-07-12 16:17:18.000000', '去啊'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1531412264667, 0, 82003, 1528356378455, '2018-07-12 16:17:44.000000', '去哪呢?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1531887938362, 1531063660028, 82001, 1531062713966, '2018-07-18 04:25:38.000000', '是呀'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1531894411487, 0, 82001, 1520242333325, '2018-07-18 06:13:31.000000', 'sssx'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1531983163150, 0, 1531969715979, 1531969818357, '2018-07-19 06:52:43.000000', 'http://q18idc.com'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1532057419100, 0, 38710, 1531969818357, '2018-07-20 03:30:19.000000', '可以加上标题哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533008631299, 1532057419100, 82001, 1531969818357, '2018-07-31 03:43:51.000000', '加上'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533120405110, 1516780129884, 82001, 1516086423441, '2018-08-01 10:46:45.000000', 'eeeeee'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533120420498, 1528105592852, 82001, 1516086423441, '2018-08-01 10:47:00.000000', 'eeeeeee'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533186909764, 0, 82001, 1531969818357, '2018-08-02 05:15:09.000000', 'hello'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533187733941, 0, 82001, 1508072633830, '2018-08-02 05:28:53.000000', '好好'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533188056603, 1531887938362, 82001, 1531062713966, '2018-08-02 05:34:16.000000', '顺带'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533195207026, 0, 82001, 1531062713966, '2018-08-02 07:33:27.000000', 'JJ'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533202426013, 1533186909764, 82003, 1531969818357, '2018-08-02 09:33:46.000000', 'world'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533202917743, 1533186909764, 82001, 1531969818357, '2018-08-02 09:41:57.000000', '00'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533629063261, 0, 82001, 1531969818357, '2018-08-07 08:04:23.000000', '大鸡鸡'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533631893738, 0, 82001, 1531969818357, '2018-08-07 08:51:33.000000', '哈哈哈哈哈哈'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533809879340, 1533186909764, 82001, 1531969818357, '2018-08-09 10:17:59.000000', '434'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533889646344, 0, 82001, 1508072491570, '2018-08-10 08:27:26.000000', '11111111'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533902815448, 0, 82001, 1531969818357, '2018-08-10 12:06:55.000000', '很不要吃'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1533902902749, 0, 82001, 1531969818357, '2018-08-10 12:08:22.000000', '性能还可以'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1534053913157, 1524190941111, 1508072160401, 1516086423441, '2018-08-12 06:05:13.000000', '怎么约?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1534128014211, 0, 82001, 1520242333325, '2018-08-13 02:40:14.000000', 'zxxx'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1534412022857, 0, 82001, 1531969818357, '2018-08-16 09:33:42.000000', 'dgf'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1534684074665, 1531983163150, 82001, 1531969818357, '2018-08-19 13:07:54.000000', 'ggggg'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1534684209052, 110, 82001, 371, '2018-08-19 13:10:09.000000', '44444444444444444444444444'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1534926143012, 0, 82001, 1508053762227, '2018-08-22 08:22:23.000000', '治标不治本在不在不在不'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1534926149638, 1517375165233, 82001, 1508053762227, '2018-08-22 08:22:29.000000', '把标准版申报表上班设备'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1534992151350, 0, 82001, 1516086423441, '2018-08-23 02:42:31.000000', '你咋不'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1535279823332, 0, 82001, 1520242333325, '2018-08-26 10:37:03.000000', '斤斤计较'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1535279827983, 0, 82001, 1520242333325, '2018-08-26 10:37:07.000000', '斤斤计较'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1535598334136, 1534992151350, 82003, 1516086423441, '2018-08-30 03:05:34.000000', '啥?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1535600352436, 0, 82001, 1520242333325, '2018-08-30 03:39:12.000000', '6666666'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1535600430479, 0, 82001, 1520242333325, '2018-08-30 03:40:30.000000', '法拉利'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1535785537390, 1535279823332, 82003, 1520242333325, '2018-09-01 07:05:37.000000', '不好哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1535785585222, 1534926143012, 82003, 1508053762227, '2018-09-01 07:06:25.000000', '啥?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1535963519864, 0, 82001, 1535781636403, '2018-09-03 08:31:59.000000', 'gghhh'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1535963525135, 1535963519864, 82001, 1535781636403, '2018-09-03 08:32:05.000000', 'gyuji'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1536337000073, 1516686985310, 82001, 1516086423441, '2018-09-07 16:16:40.000000', 'heh'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1536378833060, 0, 82001, 1508072633830, '2018-09-08 03:53:53.000000', '真的嘛'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1536469270492, 0, 82001, 1528356496939, '2018-09-09 05:01:10.000000', '这是啥表情?Σ(ŎдŎ|||)ノノ'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1536805661269, 0, 70793, 1536805585275, '2018-09-13 02:27:41.000000', '6s再战一年'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1537373307627, 0, 82001, 1516086423441, '2018-09-19 16:08:27.000000', '。。。'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1537410620002, 0, 82001, 1536805585275, '2018-09-20 02:30:20.000000', '不一样'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1537710348414, 0, 82001, 1516086423441, '2018-09-23 13:45:48.000000', 'hhj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1537710359760, 0, 82001, 1516086423441, '2018-09-23 13:45:59.000000', '锵锵锵'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1537857324518, 0, 82001, 1536805585275, '2018-09-25 06:35:24.000000', '嗯呢'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1537857334299, 1537857324518, 82001, 1536805585275, '2018-09-25 06:35:34.000000', '嗯嗯'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1539252343243, 1539252313711, 82001, 15, '2018-10-11 10:05:43.000000', 'dxdf'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1539252350604, 1539252337210, 82001, 15, '2018-10-11 10:05:50.000000', 'djdnjd'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1539868250267, 1531063660028, 82001, 1531062713966, '2018-10-18 13:10:50.000000', '555555555555555555'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1539868258868, 1533188056603, 82001, 1531062713966, '2018-10-18 13:10:58.000000', '555555555'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1539868269471, 1539868250267, 82001, 1531062713966, '2018-10-18 13:11:09.000000', '4444444444444'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1539868275645, 1531887938362, 82001, 1531062713966, '2018-10-18 13:11:15.000000', '22222222222222222'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1539960436993, 0, 82001, 1539868023868, '2018-10-19 14:47:16.000000', '111'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1541496033857, 0, 82001, 301, '2018-11-06 09:20:33.000000', '能解决'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1541651688961, 1539960436993, 82001, 1539868023868, '2018-11-08 04:34:48.000000', '哈哈'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1541815269164, 0, 82001, 1541667945772, '2018-11-10 02:01:09.000000', '11'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1543193682067, 0, 1528339692804, 1528269822710, '2018-11-26 00:54:42.000000', 'ss'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1544496611006, 0, 82001, 15, '2018-12-11 02:50:11.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1544496618728, 0, 82001, 15, '2018-12-11 02:50:18.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1544496620126, 0, 82001, 15, '2018-12-11 02:50:20.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1544503960414, 1537410620002, 1544503822963, 1536805585275, '2018-12-11 04:52:40.000000', '664984'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1545527888416, 0, 82001, 1553096819293, '2018-12-23 01:18:08.000000', 'hello'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1545527898986, 1545527888416, 82001, 1553096819293, '2018-12-23 01:18:18.000000', 'world'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1545527923036, 1545527888416, 82001, 1553096819293, '2018-12-23 01:18:43.000000', '还差还差还差'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1545918307310, 0, 82001, 15, '2018-12-27 13:45:07.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1545927001999, 1545895875719, 82001, 1553096819293, '2018-12-27 16:10:02.000000', '哦哦哦www'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1545961973331, 0, 82001, 15, '2018-12-28 01:52:53.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1546050359778, 0, 82001, 15, '2018-12-29 02:25:59.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1546050386785, 0, 82001, 1516086423441, '2018-12-29 02:26:26.000000', '不鸟你'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1546934145366, 0, 82001, 15, '2019-01-08 07:55:45.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1546935903414, 0, 82001, 15, '2019-01-08 08:25:03.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551061659233, 0, 82001, 15, '2019-02-25 02:27:39.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551080228544, 0, 82001, 1553096819293, '2019-02-25 07:37:08.000000', '几何画板'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551080263524, 0, 82001, 1516086423441, '2019-02-25 07:37:43.000000', '你就看看'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551146130246, 0, 82001, 15, '2019-02-26 01:55:30.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551325753556, 0, 82001, 15, '2019-02-28 03:49:13.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551409858047, 0, 82001, 301, '2019-03-01 03:10:58.000000', '您'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551430453424, 0, 82001, 1553096819293, '2019-03-01 08:54:13.000000', '啊啊'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551430465241, 1551430453424, 82001, 1553096819293, '2019-03-01 08:54:25.000000', '123'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551430474490, 1551430453424, 82001, 1553096819293, '2019-03-01 08:54:34.000000', '444'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551430485689, 1551430453424, 82001, 1553096819293, '2019-03-01 08:54:45.000000', '品牌'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551430485828, 0, 82001, 1553096819293, '2019-03-01 08:54:45.000000', '品牌'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551430579358, 1516691119239, 82001, 1516086423441, '2019-03-01 08:56:19.000000', '555555'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551683545557, 1490863711703, 82001, 511, '2019-03-04 07:12:25.000000', '科技'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1551777156494, 0, 82001, 15, '2019-03-05 09:12:36.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1552215780595, 0, 82001, 15, '2019-03-10 11:03:00.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1552297994119, 0, 82001, 1512314438990, '2019-03-11 09:53:14.000000', '小米'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1552298015880, 1524799118232, 82001, 1512314438990, '2019-03-11 09:53:35.000000', '评论真的假的'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1552378943273, 0, 82001, 1551251234369, '2019-03-12 08:22:23.000000', '123'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1552381508342, 0, 82001, 15, '2019-03-12 09:05:08.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1552532948487, 0, 82001, 15, '2019-03-14 03:09:08.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1552980434725, 0, 82001, 15, '2019-03-19 07:27:14.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553053346095, 0, 82001, 1553096819293, '2019-03-20 03:42:26.000000', '启'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553053362233, 1551430485689, 82001, 1553096819293, '2019-03-20 03:42:42.000000', '集合vyih'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553065269448, 0, 82001, 1553096819293, '2019-03-20 07:01:09.000000', '3333'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553094325098, 0, 82001, 1550825876665, '2019-03-20 15:05:25.000000', '哦哦哦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553095251058, 0, 82001, 1552879777083, '2019-03-20 15:20:51.000000', '1111'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553233020780, 0, 82001, 15, '2019-03-22 05:37:00.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553433076832, 0, 82001, 1552879777083, '2019-03-24 13:11:16.000000', 'ggg'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553676470274, 0, 82001, 1551184480247, '2019-03-27 08:47:50.000000', 'hhhhhh'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553739854431, 0, 82001, 1539868023868, '2019-03-28 02:24:14.000000', '。。。。'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553837780458, 0, 82001, 1548145750536, '2019-03-29 05:36:20.000000', '王八蛋'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1553837842352, 0, 82001, 1541557989440, '2019-03-29 05:37:22.000000', '小赤佬'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554051650026, 0, 82001, 15, '2019-03-31 17:00:50.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554263554592, 0, 82001, 15, '2019-04-03 03:52:34.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554263558562, 0, 82001, 15, '2019-04-03 03:52:38.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554286215772, 0, 82001, 301, '2019-04-03 10:10:15.000000', 'hjkj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554309729462, 0, 82001, 1554263554668, '2019-04-03 16:42:09.000000', '没有我'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554309735842, 1554309729462, 82001, 1554263554668, '2019-04-03 16:42:15.000000', '哦下午'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554372265517, 0, 82001, 1554263554668, '2019-04-04 10:04:25.000000', '测试'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554373265740, 0, 82001, 543, '2019-04-04 10:21:05.000000', '那你'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554373282941, 0, 82001, 543, '2019-04-04 10:21:22.000000', '。'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554374987602, 1554372265517, 82001, 1554263554668, '2019-04-04 10:49:47.000000', '@jj'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554548838567, 0, 82001, 1554263558104, '2019-04-06 11:07:18.000000', 'Yyhgy'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554564631059, 0, 82001, 15, '2019-04-06 15:30:31.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554564640129, 0, 82001, 15, '2019-04-06 15:30:40.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554629321427, 0, 82001, 15, '2019-04-07 09:28:41.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554704296003, 0, 82001, 1554564640071, '2019-04-08 06:18:16.000000', '吃'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554707281257, 0, 82001, 1554688976001, '2019-04-08 07:08:01.000000', '要'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554777053552, 0, 82001, 15, '2019-04-09 02:30:53.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554864037995, 0, 82001, 15, '2019-04-10 02:40:37.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554965019923, 0, 82001, 15, '2019-04-11 06:43:39.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1554976816197, 0, 82001, 1554688976001, '2019-04-11 10:00:16.000000', '到现在'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555136064488, 0, 82001, 1555080161904, '2019-04-13 06:14:24.000000', '。。。'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555136143476, 0, 82001, 1554564639808, '2019-04-13 06:15:43.000000', '。。。'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555140354828, 0, 82001, 15, '2019-04-13 07:25:54.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555414582495, 0, 82001, 15, '2019-04-16 11:36:22.000000', '新增一条评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555414840945, 0, 82001, 15, '2019-04-16 11:40:40.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555414849052, 0, 82001, 15, '2019-04-16 11:40:49.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555414888850, 0, 82001, 15, '2019-04-16 11:41:28.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555557851140, 1512035117021, 82001, 32, '2019-04-18 03:24:11.000000', '1545456'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555557860778, 1512035117021, 82001, 32, '2019-04-18 03:24:20.000000', '11564546'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555557868075, 0, 82001, 32, '2019-04-18 03:24:28.000000', '121212312456'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555557877452, 1555557868075, 82001, 32, '2019-04-18 03:24:37.000000', '123121545645'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1555572659357, 0, 82001, 15, '2019-04-18 07:30:59.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556073175252, 0, 82001, 1555842172364, '2019-04-24 02:32:55.000000', '卡罗拉'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556088728850, 0, 82001, 1555660645705, '2019-04-24 06:52:08.000000', '啦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556088739682, 0, 82001, 1555842172364, '2019-04-24 06:52:19.000000', '叫姐姐'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556088750041, 1556088739682, 82001, 1555842172364, '2019-04-24 06:52:30.000000', '哼╯^╰'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556109617193, 0, 82001, 15, '2019-04-24 12:40:17.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556179911249, 0, 82001, 1555146101956, '2019-04-25 08:11:51.000000', '莫有样在真'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556179917534, 1556179911249, 82001, 1555146101956, '2019-04-25 08:11:57.000000', '你以为走咯'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556179921272, 1556179911249, 82001, 1555146101956, '2019-04-25 08:12:01.000000', '匿名'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556187596511, 0, 82001, 15, '2019-04-25 10:19:56.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556192437849, 0, 82001, 1555826433407, '2019-04-25 11:40:37.000000', '哈哈哈'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556264166448, 0, 82001, 15, '2019-04-26 07:36:06.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556434477631, 0, 82001, 1556416532140, '2019-04-28 06:54:37.000000', '叶圣陶'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556438316917, 0, 82001, 15, '2019-04-28 07:58:36.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556447474223, 0, 82001, 15, '2019-04-28 10:31:14.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556447629955, 0, 82001, 1556447474076, '2019-04-28 10:33:49.000000', '啦啦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556447642188, 0, 82001, 1556447473966, '2019-04-28 10:34:02.000000', '啦啦'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556606726466, 0, 82001, 15, '2019-04-30 06:45:26.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556608158926, 0, 82001, 1556607959204, '2019-04-30 07:09:18.000000', '佛祖'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556852777588, 0, 82001, 15, '2019-05-03 03:06:17.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556953335513, 0, 82001, 1556387217941, '2019-05-04 07:02:15.000000', '嘻嘻嘻'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556953340357, 1556953335513, 82001, 1556387217941, '2019-05-04 07:02:20.000000', '额额额'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556987652879, 0, 82001, 15, '2019-05-04 16:34:12.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556987738892, 0, 82001, 15, '2019-05-04 16:35:38.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1556988311205, 0, 82001, 15, '2019-05-04 16:45:11.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557024488300, 1556953340357, 82001, 1556387217941, '2019-05-05 02:48:08.000000', '222'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557133819296, 0, 82001, 1555146150581, '2019-05-06 09:10:19.000000', '988'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557239093145, 0, 82001, 15, '2019-05-07 14:24:53.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557254398378, 0, 82002, 15, '2019-05-07 18:39:58.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557254443156, 0, 82001, 15, '2019-05-07 18:40:43.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557254466593, 0, 82001, 15, '2019-05-07 18:41:06.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557254474819, 0, 82001, 15, '2019-05-07 18:41:14.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557367770352, 0, 82001, 1508072633830, '2019-05-09 02:09:30.000000', '哈哈'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557396836045, 0, 82001, 15, '2019-05-09 10:13:56.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557415832512, 0, 82001, 15, '2019-05-09 15:30:32.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557707040335, 0, 82001, 1550825876665, '2019-05-13 00:24:00.000000', '帅吗?'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557754720666, 0, 82001, 1557754680146, '2019-05-13 13:38:40.000000', '卧槽(*`へ´*)'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557754765785, 0, 70793, 1557754680146, '2019-05-13 13:39:25.000000', '链接发下'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557754909538, 1557754765785, 82012, 1557754680146, '2019-05-13 13:41:49.000000', 'https://baijiahao.baidu.com/s?id=1633129683262867786&wfr=spider&for=pc&isFailFlag=1'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1557838424004, 0, 1508072105320, 1557754680146, '2019-05-14 12:53:44.000000', '666'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558059734104, 0, 82001, 15, '2019-05-17 02:22:14.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558059843115, 0, 82001, 15, '2019-05-17 02:24:03.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558150056102, 0, 82001, 1557754680146, '2019-05-18 03:27:36.000000', '哈哈哈'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558251372701, 0, 82001, 15, '2019-05-19 07:36:12.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558275517613, 0, 82001, 15, '2019-05-19 14:18:37.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558275862700, 0, 82001, 15, '2019-05-19 14:24:22.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558440302601, 0, 82001, 1557415707105, '2019-05-21 12:05:02.000000', '咔咔咔'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558440307225, 0, 82001, 1557415707105, '2019-05-21 12:05:07.000000', 'i我看'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558440318878, 0, 82001, 1555146144094, '2019-05-21 12:05:18.000000', '哦啊就是计算机'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558440335644, 0, 82001, 1557754680146, '2019-05-21 12:05:35.000000', '就是就是觉得奖学金'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558440349435, 0, 82001, 1557754680146, '2019-05-21 12:05:49.000000', '解决'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558440357141, 1558440335644, 82001, 1557754680146, '2019-05-21 12:05:57.000000', '惊声尖叫额'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1558444517410, 0, 82001, 15, '2019-05-21 13:15:17.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559479971167, 0, 82001, 15, '2019-06-02 12:52:51.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559512310810, 0, 82001, 1559479693309, '2019-06-02 21:51:50.000000', 'gggh'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559512315277, 1559512310810, 82001, 1559479693309, '2019-06-02 21:51:55.000000', 'ghhh'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559531009662, 0, 82001, 15, '2019-06-03 03:03:29.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559532427131, 0, 82001, 15, '2019-06-03 03:27:07.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559533505750, 0, 82001, 15, '2019-06-03 03:45:05.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559533513284, 0, 82001, 15, '2019-06-03 03:45:13.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559553148600, 0, 82001, 1559479693309, '2019-06-03 09:12:28.000000', 'cbnxn'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559570720109, 0, 82001, 1555146144094, '2019-06-03 14:05:20.000000', '你妹'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559616306248, 0, 82001, 15, '2019-06-04 02:45:06.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559617707946, 0, 82001, 15, '2019-06-04 03:08:27.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559628052667, 0, 82001, 1559479693309, '2019-06-04 06:00:52.000000', '发放'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559729189116, 0, 82001, 1559479693309, '2019-06-05 10:06:29.000000', '你真的牛逼'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1559731136559, 0, 82001, 15, '2019-06-05 10:38:56.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1560090719699, 0, 82001, 15, '2019-06-09 14:31:59.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1560168492719, 0, 82001, 15, '2019-06-10 12:08:12.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1560239593640, 0, 82001, 1559479693309, '2019-06-11 07:53:13.000000', '11'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1560262370938, 0, 82001, 15, '2019-06-11 14:12:50.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1560482772803, 0, 82001, 15, '2019-06-14 03:26:12.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1560482961067, 0, 82001, 1555842172364, '2019-06-14 03:29:21.000000', '3'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1560619772678, 0, 82001, 15, '2019-06-15 17:29:32.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1560736990682, 0, 82001, 15, '2019-06-17 02:03:10.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1561018625380, 1559512310810, 82001, 1559479693309, '2019-06-20 08:17:05.000000', 'ggggg'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1561364926819, 0, 82001, 15, '2019-06-24 08:28:46.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1561533263049, 1559729189116, 82001, 1559479693309, '2019-06-26 07:14:23.000000', '6666'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1561630666744, 0, 82001, 15, '2019-06-27 10:17:46.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1561949926841, 0, 82001, 15, '2019-07-01 02:58:46.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1561975421299, 1555136064488, 82001, 1555080161904, '2019-07-01 10:03:41.000000', '是不是'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562134664290, 0, 82001, 15, '2019-07-03 06:17:44.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562226345097, 0, 82001, 15, '2019-07-04 07:45:45.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562248764054, 1559729189116, 82001, 1559479693309, '2019-07-04 13:59:24.000000', 'fdd'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562307396087, 0, 82001, 1559479693309, '2019-07-05 06:16:36.000000', '我顶我顶'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562392250526, 0, 82001, 1559479693309, '2019-07-06 05:50:50.000000', '发个方 +刚刚方法'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562392269174, 1559512310810, 82001, 1559479693309, '2019-07-06 05:51:09.000000', '古古怪怪'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562392274283, 1559553148600, 82001, 1559479693309, '2019-07-06 05:51:14.000000', '工业园'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562392278403, 1562307396087, 82001, 1559479693309, '2019-07-06 05:51:18.000000', '凤阳花鼓'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562495721307, 0, 82001, 15, '2019-07-07 10:35:21.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562662400473, 0, 82001, 15, '2019-07-09 08:53:20.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562684469790, 0, 82001, 1559125514307, '2019-07-09 15:01:09.000000', '发广告'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562684482831, 1562684469790, 82001, 1559125514307, '2019-07-09 15:01:22.000000', '厉害厉害'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562684488544, 0, 82001, 1559125514307, '2019-07-09 15:01:28.000000', '发过火'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562736873122, 1534926143012, 82001, 1508053762227, '2019-07-10 05:34:33.000000', '早睡早起'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562814013816, 0, 82001, 1562556720665, '2019-07-11 03:00:13.000000', 'xxxx'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1562814021942, 1562814013816, 82001, 1562556720665, '2019-07-11 03:00:21.000000', 'xxxx'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1563506794618, 0, 82001, 15, '2019-07-19 03:26:34.000000', '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1563641514400, 0, 82001, 1563605336326, '2019-07-20 16:51:54.000000', '年轻人不要想不开'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1570199485130, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1570357593954, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1570357613617, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1570524542455, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1570611593196, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1570611884292, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127141506, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127146874, 0, 82002, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127152654, 0, 82003, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127171390, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127176972, 0, 82002, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127182660, 0, 82003, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127220673, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127225286, 0, 82002, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127230152, 0, 82003, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127564313, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127568513, 0, 82002, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127573536, 0, 82003, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127695250, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127699686, 0, 82002, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127704277, 0, 82003, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127720172, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127724383, 0, 82002, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601127728638, 0, 82003, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1601132118675, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1612038997561, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1612039188938, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1666289476337, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1666289803266, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1666291059727, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1666291199887, 0, 82001, 15, null, '测试新增评论'); +INSERT INTO "Comment" (id, "toId", "userId", "momentId", date, content) VALUES (1666291252192, 0, 82001, 15, null, '测试新增评论'); diff --git a/QuestDB/single/qdb_public_Moment.sql b/QuestDB/single/qdb_public_Moment.sql new file mode 100644 index 0000000..0770d34 --- /dev/null +++ b/QuestDB/single/qdb_public_Moment.sql @@ -0,0 +1,224 @@ +create table "Moment" +( + date timestamp, + id bigint not null, + "userId" bigint not null, + content varchar, + "praiseUserIdList" text not null, + "pictureList" text not null +); + + +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (12, 70793, '2017-02-08 08:06:11.000000', 'APIJSON,let interfaces and documents go to hell !', '[70793, 93793, 82044, 82040, 82055, 90814, 38710, 82002, 82006, 1508072105320, 82001]', '["http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg", "http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg", "https://camo.githubusercontent.com/788c0a7e11a4f5aadef3c886f028c79b4808613a/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343932353935372d313732303737333630382e6a7067", "http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png", "https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067", "https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067", "https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067", "https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (32, 82002, '2017-02-08 08:06:11.000000', null, '[38710, 82002, 82001]', '["https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067", "https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067", "http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (58, 90814, '2017-02-01 11:14:31.000000', 'This is a Content...-435', '[38710, 82003, 82005, 93793, 82006, 82044, 82001]', '["http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (170, 70793, '2017-02-01 11:14:31.000000', 'This is a Content...-73', '[82044, 82002, 82001]', '["http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg", "http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg", "http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (301, 93793, '2017-02-01 11:14:31.000000', 'This is a Content...-301', '[38710, 93793, 82003, 82005, 82040, 82055, 82002, 82001]', '["http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (371, 82002, '2017-02-01 11:14:31.000000', 'This is a Content...-371', '[90814, 93793, 82003, 82005, 82006, 82040, 82002, 82001]', '["http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg", "http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg", "https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067", "http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg", "http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (470, 38710, '2017-02-01 11:14:31.000000', 'This is a Content...-470', '[82001]', '["http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (511, 38710, '2017-02-08 08:06:11.000000', null, '[70793, 93793, 82001]', '["https://camo.githubusercontent.com/f513fa631bd780dc0ec3cf2663777e356dc3664f/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343733323232332d3337333933303233322e6a7067", "http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg", "https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067", "http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg", "http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg", "https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (543, 93793, '2017-02-08 08:06:11.000000', null, '[82001]', '["https://camo.githubusercontent.com/5f5c4e0c4dc539c34e8eae8ac0cbc6dccdfee5d3/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343533333831362d323032373434343231382e6a7067", "https://camo.githubusercontent.com/c98b1c86af136745cc4626c6ece830f76de9ee83/687474703a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3636303036372f3230313630342f3636303036372d32303136303431343232343930383036362d313837323233393236352e6a7067", "http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg", "http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg", "http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (551, 70793, '2017-02-08 08:06:11.000000', 'test', '[82001]', '["http://static.oschina.net/uploads/img/201604/22172507_Pz9Y.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (595, 38710, '2017-03-05 05:29:19.000000', null, '[70793, 82002, 82001]', '["http://common.cnblogs.com/images/icon_weibo_24.png", "http://static.oschina.net/uploads/user/19/39085_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (704, 38710, '2017-03-12 09:39:44.000000', 'APIJSON is a JSON Transmission Structure Protocol…', '[82003, 82002, 82001]', '["http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000", "http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1491200468898, 38710, '2017-04-03 06:21:08.000000', 'APIJSON, let interfaces go to hell!', '[82001]', '["http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000", "http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1493835799335, 38710, '2017-05-03 18:23:19.000000', 'APIJSON is a JSON Transmission Structure Protocol…', '[82002, 82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1508053762227, 82003, '2017-10-15 07:49:22.000000', '我也试试', '[1515565976140, 82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1508072491570, 82002, '2017-10-15 13:01:31.000000', '有点冷~', '[82001, 82002]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1548145750829, 82003, '2019-01-22 08:29:10.000000', '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1549017200628, 82001, '2019-02-01 10:33:20.000000', '说点什么吧~快捷键', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1508072633830, 93793, '2017-10-15 13:03:53.000000', '天凉了 +有男朋友的抱男盆友 +有女朋友的抱女朋友 +而我就比较牛逼了 +我不冷。', '[82005, 82002, 70793, 38710, 82045, 82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1508073178489, 82045, '2017-10-15 13:12:58.000000', '发动态', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1512314438990, 38710, '2017-12-03 15:20:38.000000', 'APIJSON iOS-Swift版发布,自动生成请求代码,欢迎使用^_^ + https://github.com/TommyLemon/APIJSON', '[82001, 82002, 70793, 1512531601485]', '["https://images2018.cnblogs.com/blog/660067/201712/660067-20171203231829476-1202860128.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1513094436910, 38710, '2017-12-12 16:00:36.000000', 'APIJSON-Python已发布,欢迎体验^_^ +https://github.com/TommyLemon/APIJSON', '[82005, 82001]', '["https://raw.githubusercontent.com/TommyLemon/APIJSON/master/picture/APIJSON_Auto_get.jpg", "https://raw.githubusercontent.com/TommyLemon/APIJSON/master/picture/APIJSON_Auto_code.jpg", "https://raw.githubusercontent.com/TommyLemon/APIJSON/master/picture/APIJSON_Auto_doc.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1514017444961, 82002, '2017-12-23 08:24:04.000000', '123479589679', '[82002, 1520242280259, 82001, 70793, 1524042900591, 1528264711016]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1514858533480, 82056, '2018-01-02 02:02:13.000000', 'I am the Iron Man', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1516086423441, 93793, '2018-01-16 07:07:03.000000', '抢到票了,开心ପ( ˘ᵕ˘ ) ੭ ☆', '[93793, 38710, 82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1520242333325, 1520242280259, '2018-03-05 09:32:13.000000', '法拉利', '[1520242280259, 70793, 82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1523935589834, 1523626157302, '2018-04-17 03:26:29.000000', 'by第一条动态', '[]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1523936332614, 1523626157302, '2018-04-17 03:38:52.000000', 'by第二条', '[82001, 1523935772553]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1524178455305, 1524042900591, '2018-04-19 22:54:15.000000', '早上好啊', '[1524042900591, 38710, 82003, 82001, 1523626157302]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1524298780222, 1524298730523, '2018-04-21 08:19:40.000000', 'e说点什么吧~', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1524826652626, 1524298730523, '2018-04-27 10:57:32.000000', '说点什么吧~哈哈哈', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1527498273102, 1527498229991, '2018-05-28 09:04:33.000000', '说点什么吧~yui', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1527821296110, 1527495857924, '2018-06-01 02:48:16.000000', '这是我的商品1号', '[1527821445610, 82003, 82001]', '["http://pic31.nipic.com/20130710/13151003_093759013311_2.jpg", "https://cbu01.alicdn.com/img/ibank/2013/514/580/740085415_2101098104.310x310.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1527830331780, 1527495857924, '2018-06-01 05:18:51.000000', '各种购物袋', '[38710, 82002, 1527495857924, 82003]', '["https://cbu01.alicdn.com/img/ibank/2018/292/335/8058533292_57202994.310x310.jpg", "https://cbu01.alicdn.com/img/ibank/2018/089/747/8586747980_1843977904.310x310.jpg", "https://cbu01.alicdn.com/img/ibank/2016/025/123/3012321520_471514049.310x310.jpg", "https://cbu01.alicdn.com/img/ibank/2017/729/995/4800599927_69233977.310x310.jpg", "https://cbu01.alicdn.com/img/ibank/2016/377/263/3755362773_609022431.310x310.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1527830474378, 1527495857924, '2018-06-01 05:21:14.000000', '电视机', '[1527495857924]', '["https://cbu01.alicdn.com/img/ibank/2017/231/077/4524770132_781046171.310x310.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528251335464, 1528250827953, '2018-06-06 02:15:35.000000', 'meiyou', '[1528250827953]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528260617722, 1528255497767, '2018-06-06 04:50:17.000000', '。。。。', '[]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528269822710, 1528264711016, '2018-06-06 07:23:42.000000', 'hhhhhhh', '[1528250827953, 82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528269988360, 1528250827953, '2018-06-06 07:26:28.000000', '为什么发动态默认会有这两张图片啊?不可以选择自己的图片', '[1528250827953]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528274037224, 1528250827953, '2018-06-06 08:33:57.000000', '说点什么吧~hgdsryh', '[]', '["https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E4%BA%91%E5%8D%97%E9%A3%8E%E6%99%AF%E5%9B%BE%E7%89%87&step_word=&hs=0&pn=0&spn=0&di=163958046450&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=2&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=-1&cs=1403824732%2C1921310327&os=1571651475%2C3950546936&simid=3426978648%2C550887139&adpicid=0&lpn=0&ln=1985&fr=&fmq=1528273681226_R&fm=result&ic=0&s=undefined&se=&sme=&tab=0&width=&height=&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Botg9aaa_z%26e3Bv54AzdH3Fowssrwrj6_kt2_88an88_8_z%26e3Bip4s&gsm=0&rpstart=0&rpnum=0&islist=&querylist=", "https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E4%BA%91%E5%8D%97%E9%A3%8E%E6%99%AF%E5%9B%BE%E7%89%87&step_word=&hs=0&pn=12&spn=0&di=105575240210&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&istype=2&ie=utf-8&oe=utf-8&in=&cl=2&lm=-1&st=-1&cs=832573604%2C2847830718&os=1862795828%2C1682403963&simid=4268934412%2C608274877&adpicid=0&lpn=0&ln=1985&fr=&fmq=1528273681226_R&fm=result&ic=0&s=undefined&se=&sme=&tab=0&width=&height=&face=undefined&ist=&jit=&cg=&bdtype=0&oriquery=&objurl=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fkkf_z%26e3Bfzi54j_z%26e3Bv54AzdH3Fna-ccbaa-1jpwts-d90cd8ll-a-8_z%26e3Bip4s&gsm=0&rpstart=0&rpnum=0&islist=&querylist="]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528356378455, 1528264711016, '2018-06-07 07:26:18.000000', '去旅游嘛~', '[82001]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528356421201, 1528264711016, '2018-06-07 07:27:01.000000', '(ง •̀_•́)ง', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528356496939, 1528356470041, '2018-06-07 07:28:16.000000', '(๑•ั็ω•็ั๑)', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528462217322, 1528339692804, '2018-06-08 12:50:17.000000', '有没有小姐姐准备端午出游的? +地点:北戴河', '[]', '["https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072366455&di=c0d4b15b2c4b70aad49e6ae747f60742&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072499167&di=5b5621d117edbc5d344a03ba0a6b580b&imgtype=0&src=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1528676875139, 1528339692804, '2018-06-11 00:27:55.000000', '123456', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1531062713966, 82002, '2018-07-08 15:11:53.000000', '云南好美啊( ◞˟૩˟)◞', '[82001, 82005, 38710, 70793, 93793, 82003, 1531969715979]', '["https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072366455&di=c0d4b15b2c4b70aad49e6ae747f60742&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F3%2F57a2a41f57d09.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531072499167&di=5b5621d117edbc5d344a03ba0a6b580b&imgtype=0&src=http%3A%2F%2Fi0.szhomeimg.com%2FUploadFiles%2FBBS%2F2006%2F08%2F05%2F24752199_79122.91.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1531969818357, 1531969715979, '2018-07-19 03:10:18.000000', 'http://q18idc.com', '[1531969715979, 82001, 38710, 1534926301956]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1533908589726, 1533835176109, '2018-08-10 13:43:09.000000', '我的', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1535781636403, 1532188114543, '2018-09-01 06:00:36.000000', '这是一个测试', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1536064087117, 1532188114543, '2018-09-04 12:28:07.000000', '说点什么吧~奥哈达', '[]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1536805585275, 82003, '2018-09-13 02:26:25.000000', 'iPhone Xs发布了,大家怎么看?', '[82002, 82005, 70793, 82003]', '["https://pic1.zhimg.com/80/v2-e129b40810070443add1c28e6185c894_hd.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1539868023868, 82001, '2018-10-18 13:07:03.000000', '说点什么吧~3', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1540459349460, 82001, '2018-10-25 09:22:29.000000', '说点什么吧~而你', '[]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1540459361744, 82001, '2018-10-25 09:22:41.000000', '说点什么吧~哦哦', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1540634282433, 82001, '2018-10-27 09:58:02.000000', 'https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike92%2C5%2C5%2C92%2C30/sign=c31ae7219525bc313f5009ca3fb6e6d4/42a98226cffc1e17646dbede4690f603728de90b.jpg', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1541557989440, 38710, '2018-11-07 02:33:09.000000', '自动化接口和文档 APIJSON 3.0.0 发布 +https://www.oschina.net/news/101548/apijson-3-0-released', '[82001]', '["https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Auto_get.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1541667920272, 82001, '2018-11-08 09:05:20.000000', '说点什么吧~???', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1541667945772, 82001, '2018-11-08 09:05:45.000000', '说点什么吧~都有', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1541684010904, 82001, '2018-11-08 13:33:30.000000', '说点什么吧~A man can be destroyed but not defeated', '[82002, 38710, 82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1544265482923, 82001, '2018-12-08 10:38:02.000000', 'APIJSON is a JSON Transmission Structure Protocol…', '[82002, 82003, 82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1544276121218, 82001, '2018-12-08 13:35:21.000000', '说点什么吧~ajhs', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1544276216289, 1544276209348, '2018-12-08 13:36:56.000000', '说点什么吧~ey', '[1544276209348]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1544497353863, 82001, '2018-12-11 03:02:33.000000', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1544497355630, 82001, '2018-12-11 03:02:35.000000', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1544537838100, 82001, '2018-12-11 14:17:18.000000', '说点什么吧~logo灭了也可', '[]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1545187924367, 1544503822963, '2018-12-19 02:52:04.000000', '说哼哼唧唧点什么吧~', '[1544503822963, 82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1545490282104, 82001, '2018-12-22 14:51:22.000000', '说点什么吧~apijson', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1545560428650, 82001, '2018-12-23 10:20:28.000000', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1545564986045, 82003, '2018-12-23 11:36:26.000000', '测试新增动态', '[82001]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1545819572448, 82002, '2018-12-26 10:19:32.000000', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1545819572637, 82002, '2018-12-26 10:19:32.000000', '测试新增动态', '[82001]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1545819752556, 82001, '2018-12-26 10:22:32.000000', '说点什么吧~hello world', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1546934384440, 82001, '2019-01-08 07:59:44.000000', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1547436860950, 82001, '2019-01-14 03:34:20.000000', '测试新增动态', '[82001]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1547479596460, 82001, '2019-01-14 15:26:36.000000', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1547559758939, 82002, '2019-01-15 13:42:38.000000', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1548145750536, 82003, '2019-01-22 08:29:10.000000', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1548236953106, 82001, '2019-01-23 09:49:13.000000', '{@}', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1548300581350, 82002, '2019-01-24 03:29:41.000000', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1548599361342, 82001, '2019-01-27 14:29:21.000000', '说点什么吧~好)不会徐下节课斜挎包', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1548599375288, 82001, '2019-01-27 14:29:35.000000', '说点什么吧~告诉v是v就瞎几把想表达华西坝你撒几哈', '[82001]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1548822634246, 82002, '2019-01-30 04:30:34.000000', 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1548822634518, 82002, '2019-01-30 04:30:34.000000', '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096399488, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1557721145964, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560093312615, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560093312921, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1558891221463, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1558891221788, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096269459, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094319618, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560093326180, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560092284174, 82003, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560092284508, 82003, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094319934, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560093326539, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094350737, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560092302827, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560092303319, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094351045, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094254821, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094329746, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560093270103, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560093270358, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096270069, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094330083, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094255148, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096575905, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096208964, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094315580, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096419027, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094315886, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096209271, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094334838, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560094335132, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096419392, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096295559, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120326228, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096295867, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096576289, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560690276182, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560096399446, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120257647, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120257326, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1560690275764, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120218108, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120224955, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120326572, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120386111, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120385763, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120405667, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561120405325, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561630616406, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1561630616075, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1568458531964, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1568458532641, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1568461871469, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1568461872933, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570199366451, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570199483864, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601132117007, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570199485028, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127225291, 82002, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570357591525, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570357593773, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127152533, 82003, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570357610747, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127169887, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570357613596, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127573677, 82003, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570357703386, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127704144, 82003, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570524449714, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127171392, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570524540256, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127175330, 82002, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570524542006, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127228481, 82003, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570611580381, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127229998, 82003, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127176958, 82002, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1570611591924, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127693561, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127139970, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127181043, 82003, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127141514, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127724249, 82002, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127562784, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127146655, 82002, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127146920, 82002, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127150976, 82003, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127564192, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127182673, 82003, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127718645, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127219423, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127695115, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127220674, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601132118551, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127223899, 82002, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127698292, 82002, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127567029, 82002, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127568512, 82002, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127572138, 82003, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127720271, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127699686, 82002, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127727257, 82003, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127702649, 82003, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127722886, 82002, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1612038994612, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1601127728639, 82003, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1612038997550, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1612039185041, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1612039188935, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666291251828, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666289475963, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666289476308, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666289803269, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666291199308, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666289802937, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666291059722, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666291058890, 82001, null, 'APIJSON,let interfaces and documents go to hell !', '[]', '[]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666291199776, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (15, 70793, '2017-02-08 08:06:11.000000', 'APIJSON is a JSON Transmission Structure Protocol…', '[82002, 70793, 38710, 93793]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (235, 38710, '2017-02-08 08:06:11.000000', 'APIJSON,let interfaces and documents go to hell !', '[82001]', '["http://static.oschina.net/uploads/img/201604/22172508_mpwj.jpg", "http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000"]'); +INSERT INTO "Moment" (id, "userId", date, content, "praiseUserIdList", "pictureList") VALUES (1666291252183, 82001, null, '测试新增动态', '[]', '["http://static.oschina.net/uploads/user/48/96331_50.jpg"]'); diff --git a/QuestDB/single/qdb_public_apijson_user.sql b/QuestDB/single/qdb_public_apijson_user.sql new file mode 100644 index 0000000..767b541 --- /dev/null +++ b/QuestDB/single/qdb_public_apijson_user.sql @@ -0,0 +1,154 @@ +create table apijson_user +( + date timestamp, + id bigint not null, + sex smallint not null, + name varchar, + tag varchar, + head varchar, + "contactIdList" text, + "pictureList" text +); + + +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (38710, 0, 'TommyLemon', 'Android&Java', 'http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000', '[82003, 82005, 90814, 82004, 82009, 82002, 82044, 93793, 70793]', '["http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000", "http://common.cnblogs.com/images/icon_weibo_24.png"]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1511407581570, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 82003, 82005, 82006, 82021, 82023, 82036, 82033]', '[]', '2017-11-23 03:26:21.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1532439021068, 0, 'huxiaofan', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[38710, 82002, 82003, 82006, 82021]', null, '2018-07-24 13:30:21.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82045, 0, 'Green', null, 'http://common.cnblogs.com/images/wechat.png', '[82001, 82002, 82003, 1485246481130]', '[]', '2017-03-04 10:22:39.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82005, 1, 'Jan', 'AG', 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82001, 38710, 1532439021068]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82046, 0, 'Team', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[38710, 82002, 1485246481130]', '[]', '2017-03-04 15:11:17.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1534926301956, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82003, 82002, 82025]', null, '2018-08-22 08:25:01.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1525677515673, 0, 'APIJSONUser', null, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[82003, 82002, 38710]', null, '2018-05-07 07:18:35.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82002, 1, 'Happy~', 'iOS', 'http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000', '[82005, 82001, 38710]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82012, 0, 'Steve', 'FEWE', 'http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000', '[82004, 82002, 93793]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1531969715979, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 82003, 82005]', null, '2018-07-19 03:08:35.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82043, 0, 'Holiday', null, 'http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000', '[70793, 82006]', '[]', '2017-03-04 10:05:04.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1528264711016, 0, '梦', null, 'http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000', '[82021, 1528250827953]', null, '2018-06-06 05:58:31.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1544276209348, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 38710]', null, '2018-12-08 13:36:49.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82003, 1, 'Wechat', null, 'http://common.cnblogs.com/images/wechat.png', '[82001, 93793]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82041, 0, 'Holo', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[38710, 82001]', '[]', '2017-03-04 09:59:34.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82058, 0, 'StupidBird', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82001, 82002]', '[]', '2017-03-12 11:23:04.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82055, 1, 'Solid', null, 'http://static.oschina.net/uploads/user/19/39085_50.jpg', '[38710, 82002]', '[]', '2017-03-11 15:04:00.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (70793, 0, 'Strong', 'djdj', 'http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000', '[38710, 82002]', '["http://static.oschina.net/uploads/img/201604/22172508_eGDi.jpg", "http://static.oschina.net/uploads/img/201604/22172507_rrZ5.jpg", "https://camo.githubusercontent.com/788c0a7e11a", "https://camo.githubusercontent.com/f513f67"]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1544503822963, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[93793, 82003]', null, '2018-12-11 04:50:22.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1514625918255, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 93793]', null, '2017-12-30 09:25:18.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1527495857924, 0, 'account', null, 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2510057322,2452415311&fm=27&gp=0.jpg', '[1527821445610, 82012]', null, '2018-05-28 08:24:17.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1528339692804, 1, '568599', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1528250827953, 1528264711016]', null, '2018-06-07 02:48:12.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1524042900591, 1, '哈哈哈', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002, 82003]', null, '2018-04-18 09:15:00.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1514858422969, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[93793, 82056]', null, '2018-01-02 02:00:22.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1490973670928, 1, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[70793, 93793]', '[]', '2017-03-31 15:21:10.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1490427139175, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[38710, 70793]', '[]', '2017-03-25 07:32:19.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1515565976140, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82003, 82021]', null, '2018-01-10 06:32:56.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1523626157302, 1, 'Charlie_brown', '', 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1523935772553, 93793]', null, '2018-04-13 13:29:17.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1528254173621, 1, 'A', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82001, 38710]', null, '2018-06-06 03:02:53.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1523935772553, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1523626157302]', null, '2018-04-17 03:29:32.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1512531601485, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82001]', '[]', '2017-12-06 03:40:01.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1553095415917, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82001]', null, '2019-03-20 15:23:35.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1528255497767, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002]', null, '2018-06-06 03:24:57.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1520242280259, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82002]', null, '2018-03-05 09:31:20.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1528250827953, 1, 'limengt', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1528264711016]', null, '2018-06-06 02:07:07.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1527821445610, 0, 'accountt', null, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[1527495857924]', null, '2018-06-01 02:50:45.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82044, 1, 'Love', null, 'http://static.oschina.net/uploads/user/1174/2348263_50.png?t=1439773471000', '[82006]', '[]', '2017-03-04 10:20:27.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1527498229991, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1499057230629]', null, '2018-05-28 09:03:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1528356470041, 0, 'aaaa', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1528339692804]', null, '2018-06-07 07:27:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82040, 1, 'Dream', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[70793]', '[]', '2017-03-02 16:44:26.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1490420651686, 1, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[70793]', '[]', '2017-03-25 05:44:11.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1559129626356, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1507220582167]', null, '2019-05-29 11:33:46.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1533835176109, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[1532188114543]', null, '2018-08-09 17:19:36.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1490109742863, 1, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-03-21 15:22:22.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1500825221910, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-07-23 15:53:41.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493890214167, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-04 09:30:14.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1507220582167, 0, 'APIJSONUser', '通过APIJSONAuto的图像化界面注册,按Enter而不是Register', 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-05 16:23:02.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1497792972314, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-06-18 13:36:12.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1511761906715, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-11-27 05:51:46.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1524298730523, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', null, '2018-04-21 08:18:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493747512860, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 17:51:52.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493748615711, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 18:10:15.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493480142628, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-04-29 15:35:42.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1499057230629, 0, '一二三', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-07-03 04:47:10.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1512387063078, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-12-04 11:31:03.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1511965911349, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-11-29 14:31:51.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1508072071492, 0, '赵钱孙李', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-15 12:54:31.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493749090643, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 18:18:10.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493748594003, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 18:09:54.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82004, 0, 'Tommy', 'fasef', 'http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82006, 1, 'Meria', null, 'http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82009, 0, 'God', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (93793, 0, 'Mike', 'GES', 'http://static.oschina.net/uploads/user/48/96331_50.jpg', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (93794, 0, 'Lemon', null, 'http://static.oschina.net/uploads/user/48/97721_50.jpg?t=1451544779000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82020, 0, 'ORANGE', null, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82021, 1, 'Tommy', null, 'http://static.oschina.net/uploads/user/19/39085_50.jpg', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82022, 0, 'Internet', null, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82023, 0, 'No1', null, 'http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1508072105320, 1, '周吴郑王', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-15 12:55:05.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82024, 0, 'Lemon', null, 'http://static.oschina.net/uploads/user/427/855532_50.jpg?t=1435030876000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82025, 1, 'Tommy', null, 'http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82026, 0, 'iOS', null, 'http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82027, 0, 'Yong', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82028, 1, 'gaeg', null, 'http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82029, 0, 'GASG', null, 'http://common.cnblogs.com/images/wechat.png', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82030, 1, 'Fun', null, 'http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82031, 0, 'Lemon', null, 'http://static.oschina.net/uploads/user/48/96331_50.jpg', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82032, 0, 'Stack', 'fasdg', 'http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82033, 1, 'GAS', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82034, 1, 'Jump', null, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82035, 1, 'Tab', null, 'http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82036, 0, 'SAG', null, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1502639062900, 0, 'TESLA', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-08-13 15:44:22.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82037, 0, 'Test', null, 'http://static.oschina.net/uploads/user/1200/2400261_50.png?t=1439638750000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82038, 0, 'Battle', null, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1502639424119, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-08-13 15:50:24.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82039, 1, 'Everyday', null, 'http://common.cnblogs.com/images/icon_weibo_24.png', '[]', '[]', '2017-02-19 13:57:56.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1508072202871, 0, '七八九十', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-15 12:56:42.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82042, 1, 'Why', null, 'http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000', '[]', '[]', '2017-03-04 10:04:33.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82047, 0, 'Tesla', null, 'http://common.cnblogs.com/images/wechat.png', '[]', '[]', '2017-03-04 16:02:05.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82048, 0, 'Moto', null, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[]', '[]', '2017-03-04 16:04:02.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82049, 0, 'ITMan', null, 'http://static.oschina.net/uploads/user/629/1258821_50.jpg?t=1378063141000', '[]', '[]', '2017-03-05 09:51:51.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82050, 0, 'Parl', null, 'http://static.oschina.net/uploads/user/998/1997902_50.jpg?t=1407806577000', '[]', '[]', '2017-03-05 09:52:52.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82051, 0, 'Girl', null, 'http://static.oschina.net/uploads/user/1332/2664107_50.jpg?t=1457405500000', '[]', '[]', '2017-03-05 09:53:37.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82052, 0, 'Unbrella', null, 'http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000', '[]', '[]', '2017-03-05 09:57:54.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82053, 0, 'Alice', null, 'http://common.cnblogs.com/images/wechat.png', '[]', '[]', '2017-03-05 15:25:42.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82054, 0, 'Harvey', null, 'http://static.oschina.net/uploads/user/19/39085_50.jpg', '[]', '[]', '2017-03-06 12:29:03.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82056, 1, 'IronMan', null, 'http://static.oschina.net/uploads/user/48/96289_50.jpg?t=1452751699000', '[]', '[]', '2017-03-11 15:32:25.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1490584952968, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-03-27 03:22:32.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82057, 0, 'NullPointerExeption', null, 'http://static.oschina.net/uploads/user/1385/2770216_50.jpg?t=1464405516000', '[]', '[]', '2017-03-12 06:01:23.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82059, 1, 'He&She', null, 'http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000', '[]', '[]', '2017-03-19 14:49:15.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82060, 1, 'Anyway~', null, 'http://static.oschina.net/uploads/user/1/3064_50.jpg?t=1449566001000', '[]', '[]', '2017-03-21 14:10:18.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493836043151, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-03 18:27:23.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1508072160401, 0, '四五六', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-10-15 12:56:00.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (90814, 0, '007', null, 'http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000', '[]', '[]', '2017-02-01 11:21:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1510495628760, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-11-12 14:07:08.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1490109845208, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-03-21 15:24:05.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1490427577823, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-03-25 07:39:37.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493747777770, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-02 17:56:17.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493890303473, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-04 09:31:43.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493890303474, 0, 'Test Post', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-06-12 15:50:44.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1493883110132, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-05-04 07:31:50.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1492936169722, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[]', '[]', '2017-04-23 08:29:29.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1553527700480, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2019-03-25 15:28:20.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1566065271307, 0, 'new APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2019-08-17 18:08:04.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1566065621308, 0, 'new APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2019-08-17 18:13:55.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1563605318975, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2019-07-20 06:48:38.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1514623064133, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2017-12-30 08:37:44.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1561539257158, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2019-06-26 08:54:17.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1514626163032, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2017-12-30 09:29:23.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1545895694424, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-12-27 07:28:14.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1566064943195, 0, 'new APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2019-08-17 18:02:36.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1538504500574, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-10-02 18:21:40.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1538987952996, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-10-08 08:39:13.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1532188114543, 0, '宁旭', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-07-21 15:48:34.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1528344980598, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-06-07 04:16:20.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1560409157504, 0, '上邪', null, '最好的时光', null, null, '2019-06-13 06:59:17.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1524878698882, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-04-28 01:24:58.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1566065319823, 0, 'new APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2019-08-17 18:08:53.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1545707526805, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-12-25 03:12:06.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1519778917280, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-02-28 00:48:37.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1548068043688, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2019-01-21 10:54:03.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1541583762603, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-11-07 09:42:42.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1521371722416, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-03-18 11:15:22.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1547177436600, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2019-01-11 03:30:36.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1521274648008, 0, 'Kiro', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-03-17 08:17:28.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1538504264944, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-10-02 18:17:44.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1521374327542, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-03-18 11:58:47.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (1518218350585, 0, 'APIJSONUser', null, 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', null, null, '2018-02-09 23:19:10.000000'); +INSERT INTO apijson_user (id, sex, name, tag, head, "contactIdList", "pictureList", date) VALUES (82001, 1, '测试账号', 'Dev', 'https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Logo.png', '[82012, 82003, 93794, 82006, 38710, 82004, 93793]', '["http://common.cnblogs.com/images/icon_weibo_24.png"]', '2017-02-01 11:21:50.000000'); From fdcc49c2c9e8683ea80d4bb6b2c242e25265d032 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Mon, 7 Apr 2025 00:18:52 +0800 Subject: [PATCH 14/47] =?UTF-8?q?Java=EF=BC=9ASolon=20Demo=20=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=20APIJSON=208=20=E5=92=8C=20MySQL-JDBC=209.2=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=20fastjson?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APIJSON-Java-Server/APIJSONDemo-Solon/pom.xml | 8 +-- .../java/apijson/demo/DemoApplication.java | 56 ++++++++++++++++ .../java/apijson/demo/DemoFunctionParser.java | 5 +- .../java/apijson/demo/DemoObjectParser.java | 9 ++- .../main/java/apijson/demo/DemoParser.java | 22 +++--- .../main/java/apijson/demo/DemoSQLConfig.java | 67 +++++++++---------- .../java/apijson/demo/DemoSQLExecutor.java | 4 +- .../main/java/apijson/demo/DemoVerifier.java | 7 +- 8 files changed, 121 insertions(+), 57 deletions(-) diff --git a/APIJSON-Java-Server/APIJSONDemo-Solon/pom.xml b/APIJSON-Java-Server/APIJSONDemo-Solon/pom.xml index 2172ea6..3f38bf7 100644 --- a/APIJSON-Java-Server/APIJSONDemo-Solon/pom.xml +++ b/APIJSON-Java-Server/APIJSONDemo-Solon/pom.xml @@ -28,14 +28,14 @@ com.github.Tencent APIJSON - 7.1.0 + 8.0.0.0.0 - mysql - mysql-connector-java - 8.0.29 + com.mysql + mysql-connector-j + 9.2.0 diff --git a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoApplication.java b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoApplication.java index b68d67b..0fb15eb 100755 --- a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoApplication.java +++ b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoApplication.java @@ -15,10 +15,16 @@ package apijson.demo; import apijson.Log; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.parser.Feature; import org.noear.solon.Solon; import org.noear.solon.annotation.Configuration; import org.noear.solon.web.cors.CrossFilter; +import apijson.JSONParser; +import java.util.List; /** * Demo Solon Application 主应用程序启动类 @@ -38,6 +44,56 @@ public static void main(String[] args) throws Exception { }); Log.DEBUG = true; // TODO 上线前改为 false + + // 使用 fastjson + apijson.JSON.JSON_OBJECT_CLASS = JSONObject.class; + apijson.JSON.JSON_ARRAY_CLASS = JSONArray.class; + + final Feature[] DEFAULT_FASTJSON_FEATURES = {Feature.OrderedField, Feature.UseBigDecimal}; + apijson.JSON.DEFAULT_JSON_PARSER = new JSONParser() { + + @Override + public JSONObject createJSONObject() { + return new JSONObject(true); + } + + @Override + public JSONArray createJSONArray() { + return new JSONArray(); + } + + @Override + public String toJSONString(Object obj) { + return obj == null || obj instanceof String ? (String) obj : JSON.toJSONString(obj); + } + + @Override + public Object parseJSON(Object json) { + return JSON.parse(toJSONString(json), DEFAULT_FASTJSON_FEATURES); + } + + @Override + public JSONObject parseObject(Object json) { + return JSON.parseObject(toJSONString(json), DEFAULT_FASTJSON_FEATURES); + } + + @Override + public T parseObject(Object json, Class clazz) { + return JSON.parseObject(toJSONString(json), clazz, DEFAULT_FASTJSON_FEATURES); + } + + @Override + public JSONArray parseArray(Object json) { + return JSON.parseArray(toJSONString(json)); + } + + @Override + public List parseArray(Object json, Class clazz) { + return JSON.parseArray(toJSONString(json), clazz); + } + + }; + System.out.println("官方网站: http://apijson.cn"); System.out.println("设计规范: https://github.com/Tencent/APIJSON/blob/master/Document.md#3"); System.out.println("测试链接: http://apijson.cn/api?type=JSON&url=http://localhost:8080/get"); diff --git a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoFunctionParser.java b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoFunctionParser.java index ef80008..26beace 100644 --- a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoFunctionParser.java +++ b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoFunctionParser.java @@ -15,6 +15,7 @@ package apijson.demo; import apijson.orm.AbstractFunctionParser; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import apijson.RequestMethod; @@ -24,16 +25,16 @@ * 具体见 https://github.com/Tencent/APIJSON/issues/101 * @author Lemon */ -public class DemoFunctionParser extends AbstractFunctionParser { +public class DemoFunctionParser extends AbstractFunctionParser { public static final String TAG = "DemoFunctionParser"; public DemoFunctionParser() { this(null, null, 0, null); } + public DemoFunctionParser(RequestMethod method, String tag, int version, JSONObject request) { super(method, tag, version, request); } - } \ No newline at end of file diff --git a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoObjectParser.java b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoObjectParser.java index 1f13216..e494a9d 100644 --- a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoObjectParser.java +++ b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoObjectParser.java @@ -16,6 +16,7 @@ import apijson.orm.AbstractObjectParser; import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.JSONArray; import java.util.List; @@ -30,16 +31,18 @@ /**对象解析器,用来简化 Parser * @author Lemon */ -public class DemoObjectParser extends AbstractObjectParser { +public class DemoObjectParser extends AbstractObjectParser { - public DemoObjectParser(SessionState session, @NotNull JSONObject request, String parentPath, SQLConfig arrayConfig + public DemoObjectParser(SessionState session, @NotNull JSONObject request, String parentPath + , SQLConfig arrayConfig , boolean isSubquery, boolean isTable, boolean isArrayMainTable) throws Exception { super(request, parentPath, arrayConfig, isSubquery, isTable, isArrayMainTable); } @Override - public SQLConfig newSQLConfig(RequestMethod method, String table, String alias, JSONObject request, List joinList, boolean isProcedure) throws Exception { + public SQLConfig newSQLConfig(RequestMethod method, String table, String alias + , JSONObject request, List> joinList, boolean isProcedure) throws Exception { return DemoSQLConfig.newSQLConfig(method, table, alias, request, joinList, isProcedure); } diff --git a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoParser.java b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoParser.java index a49c2b9..11a1965 100644 --- a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoParser.java +++ b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoParser.java @@ -15,6 +15,7 @@ package apijson.demo; import apijson.orm.*; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import java.util.HashMap; @@ -28,7 +29,7 @@ * 具体见 https://github.com/Tencent/APIJSON/issues/38 * @author Lemon */ -public class DemoParser extends AbstractParser { +public class DemoParser extends AbstractParser { public static final Map KEY_MAP; static { @@ -69,7 +70,7 @@ public DemoParser(RequestMethod method, boolean needVerify) { private SessionState session; - public Parser setSession(SessionState session) { + public Parser setSession(SessionState session) { this.session = session; return this; } @@ -79,39 +80,40 @@ public SessionState getSession() { @Override - public Parser createParser() { + public Parser createParser() { return new DemoParser(); } @Override - public ObjectParser createObjectParser(JSONObject request, String parentPath, SQLConfig arrayConfig + public ObjectParser createObjectParser(JSONObject request, String parentPath + , SQLConfig arrayConfig , boolean isSubquery, boolean isTable, boolean isArrayMainTable) throws Exception { return new DemoObjectParser(getSession(), request, parentPath, arrayConfig , isSubquery, isTable, isArrayMainTable).setMethod(getMethod()).setParser(this); } @Override - public FunctionParser createFunctionParser() { + public FunctionParser createFunctionParser() { return new DemoFunctionParser(); } @Override - public SQLConfig createSQLConfig() { + public SQLConfig createSQLConfig() { return new DemoSQLConfig(); } @Override - public SQLExecutor createSQLExecutor() { + public SQLExecutor createSQLExecutor() { return new DemoSQLExecutor(); } @Override - public Verifier createVerifier() { + public Verifier createVerifier() { return new DemoVerifier(); } - private FunctionParser functionParser; - public FunctionParser getFunctionParser() { + private FunctionParser functionParser; + public FunctionParser getFunctionParser() { return functionParser; } public Object onFunctionParse(String key, String function, String parentPath, String currentName, JSONObject currentObject, boolean containRaw) throws Exception { diff --git a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoSQLConfig.java index cf78ace..c68b36f 100755 --- a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoSQLConfig.java @@ -20,8 +20,9 @@ import apijson.RequestMethod; import apijson.orm.Join; -import apijson.orm.Join.On; import apijson.orm.SQLConfig; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; /**SQL配置 @@ -30,7 +31,7 @@ * https://github.com/Tencent/APIJSON/blob/master/%E8%AF%A6%E7%BB%86%E7%9A%84%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3.md#c-1-1%E4%BF%AE%E6%94%B9%E6%95%B0%E6%8D%AE%E5%BA%93%E9%93%BE%E6%8E%A5 * @author Lemon */ -public class DemoSQLConfig extends AbstractSQLConfig { +public class DemoSQLConfig extends AbstractSQLConfig { public DemoSQLConfig() { super(RequestMethod.GET); @@ -60,59 +61,55 @@ public DemoSQLConfig(RequestMethod method, String table) { @Override - public String getDBVersion() { + public String gainDBVersion() { return "8.0.11"; //TODO 改成你自己的 MySQL 或 PostgreSQL 数据库版本号 //MYSQL 8 和 7 使用的 JDBC 配置不一样 } @Override - public String getDBUri() { + public String gainDBUri() { // 这个是 MySQL 8.0 及以上,要加 userSSL=false return "jdbc:mysql://localhost:3306?userSSL=false&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; // 以下是 MySQL 5.7 及以下 // return "jdbc:mysql://localhost:3306?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; //TODO 改成你自己的,TiDB 可以当成 MySQL 使用,默认端口为 4000 } @Override - public String getDBAccount() { + public String gainDBAccount() { return "root"; //TODO 改成你自己的 } @Override - public String getDBPassword() { + public String gainDBPassword() { return "apijson"; //TODO 改成你自己的,TiDB 可以当成 MySQL 使用, 默认密码为空字符串 "" } - public static SQLConfig newSQLConfig(RequestMethod method, String table, String alias, com.alibaba.fastjson.JSONObject request, List joinList, boolean isProcedure) throws Exception { - return AbstractSQLConfig.newSQLConfig(method, table, alias, request, joinList, isProcedure, new SimpleCallback() { + public static SQLConfig newSQLConfig(RequestMethod method, String table, String alias, com.alibaba.fastjson.JSONObject request, List> joinList, boolean isProcedure) throws Exception { + return AbstractSQLConfig.newSQLConfig(method, table, alias, request, joinList, isProcedure, new SimpleCallback() { @Override - public SQLConfig getSQLConfig(RequestMethod method, String database, String schema, String datasource, String table) { + public SQLConfig getSQLConfig(RequestMethod method, String database, String schema, String datasource, String table) { return new DemoSQLConfig(method, table); } }); } - - - @Override - public boolean isFakeDelete() { - return false; - } - - @Override - public Map onFakeDelete(Map map) { - return super.onFakeDelete(map); - } - - @Override - protected void onGetCrossJoinString(Join j) throws UnsupportedOperationException { - // 开启 CROSS JOIN 笛卡尔积联表 super.onGetCrossJoinString(j); - } - @Override - protected void onJoinNotRelation(String sql, String quote, Join j, String jt, List onList, On on) { - // 开启 JOIN ON t1.c1 != t2.c2 等不等式关联 super.onJoinNotRelation(sql, quote, j, jt, onList, on); - } - @Override - protected void onJoinComplexRelation(String sql, String quote, Join j, String jt, List onList, On on) { - // 开启 JOIN ON t1.c1 LIKE concat('%', t2.c2, '%') 等复杂关联 super.onJoinComplextRelation(sql, quote, j, jt, onList, on); - } - - + // @Override + // public boolean isFakeDelete() { + // return false; + // } + // + // @Override + // public Map onFakeDelete(Map map) { + // return super.onFakeDelete(map); + // } + + // @Override + // protected void onGainCrossJoinString(Join j) throws UnsupportedOperationException { + // // 开启 CROSS JOIN 笛卡尔积联表 super.onGetCrossJoinString(j); + // } + // @Override + // protected void onJoinNotRelation(String sql, String quote, Join j, String jt, List onList, On on) { + // // 开启 JOIN ON t1.c1 != t2.c2 等不等式关联 super.onJoinNotRelation(sql, quote, j, jt, onList, on); + // } + // @Override + // protected void onJoinComplexRelation(String sql, String quote, Join j, String jt, List onList, On on) { + // // 开启 JOIN ON t1.c1 LIKE concat('%', t2.c2, '%') 等复杂关联 super.onJoinComplexRelation(sql, quote, j, jt, onList, on); + // } } diff --git a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoSQLExecutor.java b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoSQLExecutor.java index f446110..197ed16 100644 --- a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoSQLExecutor.java +++ b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoSQLExecutor.java @@ -16,6 +16,8 @@ import apijson.Log; import apijson.orm.AbstractSQLExecutor; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; /** * SQL 执行器,支持连接池及多数据源 @@ -23,7 +25,7 @@ * * @author Lemon */ -public class DemoSQLExecutor extends AbstractSQLExecutor { +public class DemoSQLExecutor extends AbstractSQLExecutor { private static final String TAG = "DemoSQLExecutor"; static { diff --git a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoVerifier.java b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoVerifier.java index 9af6e37..0aa803b 100644 --- a/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoVerifier.java +++ b/APIJSON-Java-Server/APIJSONDemo-Solon/src/main/java/apijson/demo/DemoVerifier.java @@ -16,16 +16,19 @@ import apijson.orm.AbstractVerifier; import apijson.orm.Parser; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; /**安全校验器,校验请求参数、角色与权限等 * 具体见 https://github.com/Tencent/APIJSON/issues/12 * @author Lemon */ -public class DemoVerifier extends AbstractVerifier { +public class DemoVerifier extends AbstractVerifier { public static final String TAG = "DemoVerifier"; @Override - public Parser createParser() { + public Parser createParser() { return new DemoParser(); } + } From eb051b0df273f30479b10d1238d666e4ed2efadd Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Mon, 7 Apr 2025 00:27:13 +0800 Subject: [PATCH 15/47] =?UTF-8?q?Java=EF=BC=9AAPIJSONDemo=20=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=20APIJSON=208=20=E5=92=8C=20MySQL-JDBC=209.2,=20Postg?= =?UTF-8?q?reSQL-JDBC=2042.7.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APIJSON-Java-Server/APIJSONDemo/pom.xml | 25 ++++-- .../java/apijson/demo/DemoApplication.java | 87 +++++++++++++++++-- .../java/apijson/demo/DemoController.java | 8 +- .../java/apijson/demo/DemoFunctionParser.java | 42 +++++++++ .../java/apijson/demo/DemoObjectParser.java | 46 ++++++++++ .../main/java/apijson/demo/DemoParser.java | 82 +++++++++++++++++ .../main/java/apijson/demo/DemoSQLConfig.java | 18 ++-- .../java/apijson/demo/DemoSQLExecutor.java | 31 +++++++ .../main/java/apijson/demo/DemoVerifier.java | 28 ++++++ 9 files changed, 344 insertions(+), 23 deletions(-) create mode 100644 APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoFunctionParser.java create mode 100644 APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoObjectParser.java create mode 100644 APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoParser.java create mode 100644 APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoSQLExecutor.java create mode 100644 APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoVerifier.java diff --git a/APIJSON-Java-Server/APIJSONDemo/pom.xml b/APIJSON-Java-Server/APIJSONDemo/pom.xml index 22d577c..083acd1 100755 --- a/APIJSON-Java-Server/APIJSONDemo/pom.xml +++ b/APIJSON-Java-Server/APIJSONDemo/pom.xml @@ -20,16 +20,23 @@ + + + com.alibaba + fastjson + 1.2.83 + + com.github.Tencent APIJSON - 7.1.0 + 8.0.0.0.0 com.github.APIJSON apijson-framework - 7.1.5 + 7.2.0.0 jakarta.servlet @@ -39,14 +46,14 @@ - mysql - mysql-connector-java - 8.0.29 + com.mysql + mysql-connector-j + 9.2.0 org.postgresql postgresql - 42.3.8 + 42.7.2 @@ -66,6 +73,12 @@ + + com.google.protobuf + protobuf-java + 3.25.1 + compile + diff --git a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoApplication.java b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoApplication.java index 995fc8e..b2ba00e 100755 --- a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoApplication.java +++ b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoApplication.java @@ -14,8 +14,13 @@ package apijson.demo; +import apijson.JSONParser; +import apijson.framework.*; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.parser.Feature; import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.web.server.WebServerFactoryCustomizer; @@ -26,9 +31,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import apijson.Log; -import apijson.framework.APIJSONApplication; -import apijson.framework.APIJSONCreator; -import apijson.orm.SQLConfig; + +import java.util.List; /** @@ -73,12 +77,83 @@ public void addCorsMappings(CorsRegistry registry) { } static { + // 使用 fastjson + apijson.JSON.JSON_OBJECT_CLASS = JSONObject.class; + apijson.JSON.JSON_ARRAY_CLASS = JSONArray.class; + + final Feature[] DEFAULT_FASTJSON_FEATURES = {Feature.OrderedField, Feature.UseBigDecimal}; + apijson.JSON.DEFAULT_JSON_PARSER = new JSONParser() { + + @Override + public JSONObject createJSONObject() { + return new JSONObject(true); + } + + @Override + public JSONArray createJSONArray() { + return new JSONArray(); + } + + @Override + public String toJSONString(Object obj) { + return obj == null || obj instanceof String ? (String) obj : JSON.toJSONString(obj); + } + + @Override + public Object parseJSON(Object json) { + return JSON.parse(toJSONString(json), DEFAULT_FASTJSON_FEATURES); + } + + @Override + public JSONObject parseObject(Object json) { + return JSON.parseObject(toJSONString(json), DEFAULT_FASTJSON_FEATURES); + } + + @Override + public T parseObject(Object json, Class clazz) { + return JSON.parseObject(toJSONString(json), clazz, DEFAULT_FASTJSON_FEATURES); + } + + @Override + public JSONArray parseArray(Object json) { + return JSON.parseArray(toJSONString(json)); + } + + @Override + public List parseArray(Object json, Class clazz) { + return JSON.parseArray(toJSONString(json), clazz); + } + + }; + // 使用本项目的自定义处理类 - APIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator() { + APIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator() { + + @Override + public DemoParser createParser() { + return new DemoParser(); + } + @Override - public SQLConfig createSQLConfig() { + public DemoFunctionParser createFunctionParser() { + return new DemoFunctionParser(); + } + + @Override + public DemoVerifier createVerifier() { + return new DemoVerifier(); + } + + @Override + public DemoSQLConfig createSQLConfig() { return new DemoSQLConfig(); } + + @Override + public DemoSQLExecutor createSQLExecutor() { + return new DemoSQLExecutor(); + } + }; // 把以下需要用到的数据库驱动取消注释即可,如果这里没有可以自己新增 diff --git a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoController.java b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoController.java index 61d30ef..03433af 100644 --- a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoController.java +++ b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoController.java @@ -17,6 +17,9 @@ import java.net.URLDecoder; import java.util.Map; +import apijson.framework.APIJSONParser; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import jakarta.servlet.http.HttpSession; import org.springframework.web.bind.annotation.GetMapping; @@ -30,7 +33,6 @@ import apijson.RequestMethod; import apijson.StringUtil; import apijson.framework.APIJSONController; -import apijson.orm.Parser; /**请求路由入口控制器,包括通用增删改查接口等,转交给 APIJSON 的 Parser 来处理 @@ -46,10 +48,10 @@ */ @RestController @RequestMapping("") -public class DemoController extends APIJSONController { +public class DemoController extends APIJSONController { @Override - public Parser newParser(HttpSession session, RequestMethod method) { + public APIJSONParser newParser(HttpSession session, RequestMethod method) { return super.newParser(session, method).setNeedVerify(false); // TODO 这里关闭校验,方便新手快速测试,实际线上项目建议开启 } diff --git a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoFunctionParser.java b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoFunctionParser.java new file mode 100644 index 0000000..0ff6c72 --- /dev/null +++ b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoFunctionParser.java @@ -0,0 +1,42 @@ +/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + +package apijson.demo; + +import apijson.RequestMethod; +import apijson.framework.APIJSONFunctionParser; +import apijson.orm.AbstractFunctionParser; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import jakarta.servlet.http.HttpSession; + + +/**可远程调用的函数类,用于自定义业务逻辑处理 + * 具体见 https://github.com/Tencent/APIJSON/issues/101 + * @author Lemon + */ +public class DemoFunctionParser extends APIJSONFunctionParser { + public static final String TAG = "DemoFunctionParser"; + + public DemoFunctionParser() { + this(null); + } + public DemoFunctionParser(HttpSession session) { + this(null, null, 0, null, session); + } + public DemoFunctionParser(RequestMethod method, String tag, int version, JSONObject curObj, HttpSession session) { + super(method, tag, version, curObj, session); + } + +} \ No newline at end of file diff --git a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoObjectParser.java b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoObjectParser.java new file mode 100644 index 0000000..7660016 --- /dev/null +++ b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoObjectParser.java @@ -0,0 +1,46 @@ +/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + +package apijson.demo; + +import apijson.NotNull; +import apijson.RequestMethod; +import apijson.framework.APIJSONObjectParser; +import apijson.orm.Join; +import apijson.orm.SQLConfig; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import jakarta.servlet.http.HttpSession; + +import java.util.List; + + +/**对象解析器,用来简化 Parser + * @author Lemon + */ +public class DemoObjectParser extends APIJSONObjectParser { + + public DemoObjectParser(HttpSession session, @NotNull JSONObject request, String parentPath + , SQLConfig arrayConfig, boolean isSubquery, boolean isTable + , boolean isArrayMainTable) throws Exception { + super(session, request, parentPath, arrayConfig, isSubquery, isTable, isArrayMainTable); + } + + @Override + public SQLConfig newSQLConfig(RequestMethod method, String table, String alias + , JSONObject request, List> joinList, boolean isProcedure) throws Exception { + return DemoSQLConfig.newSQLConfig(method, table, alias, request, joinList, isProcedure); + } + +} diff --git a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoParser.java b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoParser.java new file mode 100644 index 0000000..dad072d --- /dev/null +++ b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoParser.java @@ -0,0 +1,82 @@ +/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + +package apijson.demo; + +import apijson.RequestMethod; +import apijson.framework.APIJSONObjectParser; +import apijson.framework.APIJSONParser; +import apijson.orm.*; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import jakarta.servlet.http.HttpSession; + +import java.util.HashMap; +import java.util.Map; + + +/**请求解析器 + * 具体见 https://github.com/Tencent/APIJSON/issues/38 + * @author Lemon + */ +public class DemoParser extends APIJSONParser { + + public static final Map KEY_MAP; + static { + KEY_MAP = new HashMap<>(); + } + + public DemoParser() { + super(); + } + public DemoParser(RequestMethod method) { + super(method); + } + public DemoParser(RequestMethod method, boolean needVerify) { + super(method, needVerify); + } + +// private int maxQueryCount = 200; +// // 可重写来设置最大查询数量 +// @Override +// public int getMaxQueryCount() { +// return maxQueryCount; +// } +// +// @Override +// public int getMaxUpdateCount() { +// return 200; +// } +// +// @Override +// public int getMaxObjectCount() { +// return getMaxUpdateCount(); +// } +// +// @Override +// public int getMaxSQLCount() { +// return getMaxUpdateCount(); +// } + + @Override + public APIJSONObjectParser createObjectParser(JSONObject request, String parentPath + , SQLConfig arrayConfig + , boolean isSubquery, boolean isTable, boolean isArrayMainTable) throws Exception { + return new DemoObjectParser(getSession(), request, parentPath, arrayConfig + , isSubquery, isTable, isArrayMainTable).setMethod(getMethod()).setParser(this); + } + + // 实现应用层与数据库共用账号密码,可用于多租户、SQLAuto 等 >>>>>>>>>>>>>>> + +} diff --git a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoSQLConfig.java index 202ef9f..489b060 100755 --- a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoSQLConfig.java @@ -14,6 +14,8 @@ package apijson.demo; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.annotation.JSONField; import apijson.framework.APIJSONSQLConfig; @@ -25,7 +27,7 @@ * https://github.com/Tencent/APIJSON/blob/master/%E8%AF%A6%E7%BB%86%E7%9A%84%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3.md#c-1-1%E4%BF%AE%E6%94%B9%E6%95%B0%E6%8D%AE%E5%BA%93%E9%93%BE%E6%8E%A5 * @author Lemon */ -public class DemoSQLConfig extends APIJSONSQLConfig { +public class DemoSQLConfig extends APIJSONSQLConfig { static { DEFAULT_DATABASE = DATABASE_MYSQL; // TODO 默认数据库类型,改成你自己的 @@ -43,25 +45,25 @@ public class DemoSQLConfig extends APIJSONSQLConfig { } @Override - public String getDBVersion() { + public String gainDBVersion() { return "5.7.22"; // "8.0.11"; // TODO 改成你自己的 MySQL 或 PostgreSQL 数据库版本号 // MYSQL 8 和 7 使用的 JDBC 配置不一样 } - + @JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息 @Override - public String getDBUri() { + public String gainDBUri() { return "jdbc:mysql://localhost:3306?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; // TODO 改成你自己的,TiDB 可以当成 MySQL 使用,默认端口为 4000 } - + @JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息 @Override - public String getDBAccount() { + public String gainDBAccount() { return "root"; // TODO 改成你自己的 } - + @JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息 @Override - public String getDBPassword() { + public String gainDBPassword() { return "apijson"; // TODO 改成你自己的,TiDB 可以当成 MySQL 使用, 默认密码为空字符串 "" } diff --git a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoSQLExecutor.java b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoSQLExecutor.java new file mode 100644 index 0000000..618cbd2 --- /dev/null +++ b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoSQLExecutor.java @@ -0,0 +1,31 @@ +/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + +package apijson.demo; + +import apijson.Log; +import apijson.framework.APIJSONSQLExecutor; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; + +/** + * SQL 执行器,支持连接池及多数据源 + * 具体见 https://github.com/Tencent/APIJSON/issues/151 + * + * @author Lemon + */ +public class DemoSQLExecutor extends APIJSONSQLExecutor { + private static final String TAG = "DemoSQLExecutor"; + +} diff --git a/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoVerifier.java b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoVerifier.java new file mode 100644 index 0000000..812b635 --- /dev/null +++ b/APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/DemoVerifier.java @@ -0,0 +1,28 @@ +/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + +package apijson.demo; + +import apijson.framework.APIJSONVerifier; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; + +/**安全校验器,校验请求参数、角色与权限等 + * 具体见 https://github.com/Tencent/APIJSON/issues/12 + * @author Lemon + */ +public class DemoVerifier extends APIJSONVerifier { + public static final String TAG = "DemoVerifier"; + +} From e3898ae920dd54fe4294330d3ec74c8776d7d818 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: Mon, 7 Apr 2025 00:33:50 +0800 Subject: [PATCH 16/47] =?UTF-8?q?Java=EF=BC=9AJFinal=20Demo=20=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=20APIJSON=208,=20apijson-framework=207.2=20=E5=92=8C?= =?UTF-8?q?=20MySQL-JDBC=209.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APIJSON-Java-Server/APIJSONFinal/pom.xml | 12 +- .../java/apijson/demo/DemoFunctionParser.java | 81 ++--- .../main/java/apijson/demo/DemoParser.java | 19 +- .../main/java/apijson/demo/DemoSQLConfig.java | 36 +-- .../main/java/apijson/demo/DemoVerifier.java | 4 +- .../src/main/java/apijson/demo/JSON.java | 38 +++ .../main/java/apijson/demo/model/Privacy.java | 2 +- .../main/java/apijson/demo/model/User.java | 2 +- .../main/java/apijson/demo/model/Verify.java | 2 +- .../java/apijson/jfinal/DemoAppConfig.java | 73 ++++- .../java/apijson/jfinal/DemoController.java | 279 +++++++++--------- 11 files changed, 333 insertions(+), 215 deletions(-) create mode 100644 APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/JSON.java diff --git a/APIJSON-Java-Server/APIJSONFinal/pom.xml b/APIJSON-Java-Server/APIJSONFinal/pom.xml index 9055a63..77d7cac 100755 --- a/APIJSON-Java-Server/APIJSONFinal/pom.xml +++ b/APIJSON-Java-Server/APIJSONFinal/pom.xml @@ -36,25 +36,25 @@ com.github.Tencent APIJSON - 7.1.0 + 8.0.0.0.0 com.github.APIJSON apijson-framework - 7.1.5 + 7.2.0.0 - mysql - mysql-connector-java - 8.0.29 + com.mysql + mysql-connector-j + 9.2.0 org.postgresql postgresql - 42.3.4 + 42.7.2 diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoFunctionParser.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoFunctionParser.java index 19edc36..7813645 100644 --- a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoFunctionParser.java +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoFunctionParser.java @@ -21,24 +21,26 @@ import javax.servlet.http.HttpSession; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; - import apijson.JSONResponse; import apijson.NotNull; import apijson.RequestMethod; import apijson.StringUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; + import apijson.framework.javax.APIJSONFunctionParser; import apijson.orm.AbstractVerifier; -import apijson.orm.JSONRequest; import apijson.orm.Visitor; +import static apijson.JSONObject.KEY_COLUMN; +import static apijson.JSONRequest.KEY_COUNT; + /**可远程调用的函数类,用于自定义业务逻辑处理 * 具体见 https://github.com/Tencent/APIJSON/issues/101 * @author Lemon */ -public class DemoFunctionParser extends APIJSONFunctionParser { +public class DemoFunctionParser extends APIJSONFunctionParser { public static final String TAG = "DemoFunctionParser"; public DemoFunctionParser() { @@ -48,34 +50,34 @@ public DemoFunctionParser(RequestMethod method, String tag, int version, JSONObj super(method, tag, version, request, session); } - public Visitor getCurrentUser(@NotNull JSONObject current) { + public Visitor getCurrentUser(@NotNull JSONObject curObj) { return DemoVerifier.getVisitor(getSession()); } - public Long getCurrentUserId(@NotNull JSONObject current) { + public Long getCurrentUserId(@NotNull JSONObject curObj) { return DemoVerifier.getVisitorId(getSession()); } - public List getCurrentUserIdAsList(@NotNull JSONObject current) { + public List getCurrentUserIdAsList(@NotNull JSONObject curObj) { List list = new ArrayList<>(1); list.add(DemoVerifier.getVisitorId(getSession())); return list; } - public List getCurrentContactIdList(@NotNull JSONObject current) { - Visitor user = getCurrentUser(current); + public List getCurrentContactIdList(@NotNull JSONObject curObj) { + Visitor user = getCurrentUser(curObj); return user == null ? null : user.getContactIdList(); } /** - * @param current + * @param curObj * @param idList * @return * @throws Exception */ - public void verifyIdList(@NotNull JSONObject current, @NotNull String idList) throws Exception { - Object obj = current.get(idList); + public void verifyIdList(@NotNull JSONObject curObj, @NotNull String idList) throws Exception { + Object obj = curObj.get(idList); if (obj == null) { return; } @@ -98,13 +100,13 @@ public void verifyIdList(@NotNull JSONObject current, @NotNull String idList) th /** - * @param current + * @param curObj * @param urlList * @return * @throws Exception */ - public void verifyURLList(@NotNull JSONObject current, @NotNull String urlList) throws Exception { - Object obj = current.get(urlList); + public void verifyURLList(@NotNull JSONObject curObj, @NotNull String urlList) throws Exception { + Object obj = curObj.get(urlList); if (obj == null) { return; } @@ -127,21 +129,21 @@ public void verifyURLList(@NotNull JSONObject current, @NotNull String urlList) /** - * @param current + * @param curObj * @param momentId * @return * @throws Exception */ - public int deleteCommentOfMoment(@NotNull JSONObject current, @NotNull String momentId) throws Exception { - long mid = current.getLongValue(momentId); - if (mid <= 0 || current.getIntValue(JSONResponse.KEY_COUNT) <= 0) { + public int deleteCommentOfMoment(@NotNull JSONObject curObj, @NotNull String momentId) throws Exception { + long mid = curObj.getLongValue(momentId); + if (mid <= 0 || curObj.getIntValue(JSONResponse.KEY_COUNT) <= 0) { return 0; } - JSONRequest request = new JSONRequest(); + JSONObject request = JSON.createJSONObject(); //Comment<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - JSONRequest comment = new JSONRequest(); + JSONObject comment = JSON.createJSONObject(); comment.put("momentId", mid); request.put("Comment", comment); @@ -155,22 +157,22 @@ public int deleteCommentOfMoment(@NotNull JSONObject current, @NotNull String mo /**删除评论的子评论 - * @param current + * @param curObj * @param toId * @return */ - public int deleteChildComment(@NotNull JSONObject current, @NotNull String toId) throws Exception { - long tid = current.getLongValue(toId); - if (tid <= 0 || current.getIntValue(JSONResponse.KEY_COUNT) <= 0) { + public int deleteChildComment(@NotNull JSONObject curObj, @NotNull String toId) throws Exception { + long tid = curObj.getLongValue(toId); + if (tid <= 0 || curObj.getIntValue(JSONResponse.KEY_COUNT) <= 0) { return 0; } //递归获取到全部子评论id - JSONRequest request = new JSONRequest(); + JSONObject request = JSON.createJSONObject(); //Comment<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - JSONRequest comment = new JSONRequest(); + JSONObject comment = JSON.createJSONObject(); comment.put("id{}", getChildCommentIdList(tid)); request.put("Comment", comment); @@ -187,19 +189,20 @@ private JSONArray getChildCommentIdList(long tid) { JSONArray arr = new JSONArray(); - JSONRequest request = new JSONRequest(); + JSONObject request = JSON.createJSONObject(); //Comment-id[]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - JSONRequest idItem = new JSONRequest(); + JSONObject idItem = JSON.createJSONObject(); //Comment<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - JSONRequest comment = new JSONRequest(); + JSONObject comment = JSON.createJSONObject(); comment.put("toId", tid); - comment.setColumn("id"); + comment.put(KEY_COLUMN, "id"); idItem.put("Comment", comment); + idItem.put(KEY_COUNT, 0); //Comment>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - request.putAll(idItem.toArray(0, 0, "Comment-id")); + request.put("Comment-id[]", idItem); //Comment-id[]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> JSONObject rp = new DemoParser().setNeedVerify(false).parseResponse(request); @@ -223,23 +226,23 @@ private JSONArray getChildCommentIdList(long tid) { /**TODO 仅用来测试 "key-()":"getIdList()" 和 "key()":"getIdList()" - * @param current + * @param curObj * @return JSONArray 只能用JSONArray,用long[]会在SQLConfig解析崩溃 * @throws Exception */ - public JSONArray getIdList(@NotNull JSONObject current) { + public JSONArray getIdList(@NotNull JSONObject curObj) { return new JSONArray(new ArrayList(Arrays.asList(12, 15, 301, 82001, 82002, 38710))); } /**TODO 仅用来测试 "key-()":"verifyAccess()" - * @param current + * @param curObj * @return * @throws Exception */ - public Object verifyAccess(@NotNull JSONObject current) throws Exception { - long userId = current.getLongValue(JSONRequest.KEY_USER_ID); - String role = current.getString(JSONRequest.KEY_ROLE); + public Object verifyAccess(@NotNull JSONObject curObj) throws Exception { + long userId = curObj.getLongValue(apijson.JSONObject.KEY_USER_ID); + String role = curObj.getString(apijson.JSONObject.KEY_ROLE); if (AbstractVerifier.OWNER.equals(role) && userId != (Long) DemoVerifier.getVisitorId(getSession())) { throw new IllegalAccessException("登录用户与角色OWNER不匹配!"); } diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoParser.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoParser.java index 37f7611..88ae810 100644 --- a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoParser.java +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoParser.java @@ -14,15 +14,20 @@ package apijson.demo; +import apijson.JSONResponse; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import apijson.RequestMethod; import apijson.framework.javax.APIJSONParser; +import static apijson.JSONResponse.*; + /**请求解析器 * 具体见 https://github.com/Tencent/APIJSON/issues/38 * @author Lemon */ -public class DemoParser extends APIJSONParser { +public class DemoParser extends APIJSONParser { public DemoParser() { super(); @@ -34,6 +39,18 @@ public DemoParser(RequestMethod method, boolean needVerify) { super(method, needVerify); } + public static JSONObject parseRequest(String request) { + try { + return JSON.parseObject(request); + } catch (Throwable e) { + JSONObject obj = JSON.createJSONObject(); + obj.put(KEY_OK, false); + obj.put(KEY_CODE, JSONResponse.CODE_ILLEGAL_ARGUMENT); + obj.put(KEY_MSG, "JSON 格式不合法!" + request); + return obj; + } + } + // 可重写来设置最大查询数量 // @Override // public int getMaxQueryCount() { diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoSQLConfig.java index 273f3c3..e4fca50 100755 --- a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoSQLConfig.java @@ -19,17 +19,13 @@ import static apijson.framework.javax.APIJSONConstant.USER_; import static apijson.framework.javax.APIJSONConstant.USER_ID; -import java.text.SimpleDateFormat; -import java.util.Arrays; -import java.util.HashMap; import java.util.List; -import java.util.Map; -import apijson.Log; +import apijson.RequestMethod; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.annotation.JSONField; -import apijson.RequestMethod; -import apijson.StringUtil; import apijson.framework.javax.APIJSONSQLConfig; import apijson.orm.AbstractSQLConfig; import apijson.orm.Join; @@ -42,7 +38,7 @@ * https://github.com/Tencent/APIJSON/blob/master/%E8%AF%A6%E7%BB%86%E7%9A%84%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3.md#c-1-1%E4%BF%AE%E6%94%B9%E6%95%B0%E6%8D%AE%E5%BA%93%E9%93%BE%E6%8E%A5 * @author Lemon */ -public class DemoSQLConfig extends APIJSONSQLConfig { +public class DemoSQLConfig extends APIJSONSQLConfig { public DemoSQLConfig() { super(); @@ -66,10 +62,10 @@ public DemoSQLConfig(RequestMethod method, String table) { // TABLE_KEY_MAP.put(Privacy.class.getSimpleName(), "apijson_privacy"); // 主键名映射 - SIMPLE_CALLBACK = new SimpleCallback() { + SIMPLE_CALLBACK = new SimpleCallback() { @Override - public AbstractSQLConfig getSQLConfig(RequestMethod method, String database, String schema, String datasource, String table) { + public AbstractSQLConfig getSQLConfig(RequestMethod method, String database, String schema, String datasource, String table) { return new DemoSQLConfig(method, table); } @@ -117,7 +113,7 @@ public String getUserIdKey(String database, String schema, String datasource, St // 如果 DemoSQLExecutor.getConnection 能拿到连接池的有效 Connection,则这里不需要配置 dbVersion, dbUri, dbAccount, dbPassword @Override - public String getDBVersion() { + public String gainDBVersion() { if (isMySQL()) { return "5.7.22"; //"8.0.11"; //TODO 改成你自己的 MySQL 或 PostgreSQL 数据库版本号 //MYSQL 8 和 7 使用的 JDBC 配置不一样 } @@ -141,7 +137,7 @@ public String getDBVersion() { @JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息,用了 UnitAuto 则一定要加 @Override - public String getDBUri() { + public String gainDBUri() { if (isMySQL()) { // 这个是 MySQL 8.0 及以上,要加 userSSL=false return "jdbc:mysql://localhost:3306?userSSL=false&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; // 以下是 MySQL 5.7 及以下 @@ -168,7 +164,7 @@ public String getDBUri() { @JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息,用了 UnitAuto 则一定要加 @Override - public String getDBAccount() { + public String gainDBAccount() { if (isMySQL()) { return "root"; //TODO 改成你自己的 } @@ -192,7 +188,7 @@ public String getDBAccount() { @JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息,用了 UnitAuto 则一定要加 @Override - public String getDBPassword() { + public String gainDBPassword() { if (isMySQL()) { return "apijson"; //TODO 改成你自己的,TiDB 可以当成 MySQL 使用, 默认密码为空字符串 "" } @@ -287,16 +283,16 @@ public String getDBPassword() { @Override - protected void onGetCrossJoinString(Join j) throws UnsupportedOperationException { - // 开启 CROSS JOIN 笛卡尔积联表 super.onGetCrossJoinString(j); + protected void onGainCrossJoinString(Join join) throws UnsupportedOperationException { + // 开启 CROSS JOIN 笛卡尔积联表 super.onGetCrossJoinString(join); } @Override - protected void onJoinNotRelation(String sql, String quote, Join j, String jt, List onList, On on) { - // 开启 JOIN ON t1.c1 != t2.c2 等不等式关联 super.onJoinNotRelation(sql, quote, j, jt, onList, on); + protected void onJoinNotRelation(String sql, String quote, Join join, String jt, List onList, On on) { + // 开启 JOIN ON t1.c1 != t2.c2 等不等式关联 super.onJoinNotRelation(sql, quote, join, jt, onList, on); } @Override - protected void onJoinComplexRelation(String sql, String quote, Join j, String jt, List onList, On on) { - // 开启 JOIN ON t1.c1 LIKE concat('%', t2.c2, '%') 等复杂关联 super.onJoinComplextRelation(sql, quote, j, jt, onList, on); + protected void onJoinComplexRelation(String sql, String quote, Join join, String jt, List onList, On on) { + // 开启 JOIN ON t1.c1 LIKE concat('%', t2.c2, '%') 等复杂关联 super.onJoinComplexRelation(sql, quote, join, jt, onList, on); } } diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoVerifier.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoVerifier.java index 4875b62..b5fc72f 100644 --- a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoVerifier.java +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoVerifier.java @@ -15,12 +15,14 @@ package apijson.demo; import apijson.framework.javax.APIJSONVerifier; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; /**安全校验器,校验请求参数、角色与权限等 * 具体见 https://github.com/Tencent/APIJSON/issues/12 * @author Lemon */ -public class DemoVerifier extends APIJSONVerifier { +public class DemoVerifier extends APIJSONVerifier { public static final String TAG = "DemoVerifier"; // 重写方法来自定义字段名等 diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/JSON.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/JSON.java new file mode 100644 index 0000000..2b0d51d --- /dev/null +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/JSON.java @@ -0,0 +1,38 @@ +package apijson.demo; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; + +import java.util.Map; + +public class JSON { + + public static String toJSONString(Object obj) { + return apijson.JSON.toJSONString(obj); + } + + public static JSONObject parseObject(Object obj) { + return apijson.JSON.parseObject(obj); + } + + public static JSONArray parseArray(Object obj) { + return apijson.JSON.parseArray(obj); + } + + public static JSONObject createJSONObject() { + return apijson.JSON.createJSONObject(); + } + + public static JSONObject createJSONObject(String key, Object value) { + return apijson.JSON.createJSONObject(key, value); + } + + public static JSONObject createJSONObject(Map map) { + return apijson.JSON.createJSONObject(map); + } + + public static JSONObject createJSONArray() { + return apijson.JSON.createJSONArray(); + } + +} diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Privacy.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Privacy.java index 930c4ed..20f389d 100644 --- a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Privacy.java +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Privacy.java @@ -35,7 +35,7 @@ GETS = {OWNER, ADMIN}, POST = {UNKNOWN, ADMIN}, DELETE = {ADMIN} - ) +) public class Privacy extends BaseModel { private static final long serialVersionUID = 1L; diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/User.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/User.java index a535d28..d81e630 100644 --- a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/User.java +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/User.java @@ -29,7 +29,7 @@ @MethodAccess( POST = {UNKNOWN, ADMIN}, DELETE = {ADMIN} - ) +) public class User extends BaseModel implements Visitor { private static final long serialVersionUID = 1L; diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Verify.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Verify.java index fa5fc13..65225d9 100644 --- a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Verify.java +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Verify.java @@ -35,7 +35,7 @@ POST = {UNKNOWN, LOGIN, CONTACT, CIRCLE, OWNER, ADMIN}, PUT = {ADMIN}, DELETE = {ADMIN} - ) +) public class Verify extends BaseModel { private static final long serialVersionUID = 1L; diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/jfinal/DemoAppConfig.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/jfinal/DemoAppConfig.java index b580ebe..416aa71 100755 --- a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/jfinal/DemoAppConfig.java +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/jfinal/DemoAppConfig.java @@ -14,6 +14,11 @@ package apijson.jfinal; +import apijson.JSONParser; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.parser.Feature; import com.jfinal.aop.Interceptor; import com.jfinal.aop.Invocation; import com.jfinal.config.Constants; @@ -26,6 +31,7 @@ import com.jfinal.server.undertow.UndertowServer; import com.jfinal.template.Engine; +import java.util.List; import java.util.Map; import java.util.regex.Pattern; @@ -41,10 +47,6 @@ import apijson.framework.javax.APIJSONApplication; import apijson.framework.javax.APIJSONCreator; import apijson.orm.AbstractVerifier; -import apijson.orm.FunctionParser; -import apijson.orm.Parser; -import apijson.orm.SQLConfig; -import apijson.orm.Verifier; /** @@ -61,9 +63,11 @@ public static void main(String[] args) throws Exception { UndertowServer.start(DemoAppConfig.class); // src/main/resources/undertow.txt 中配置 undertow.port 优先于 UndertowServer.start 传参 int port Log.DEBUG = true; // 上线生产环境前改为 false,可不输出 APIJSONORM 的日志 以及 SQLException 的原始(敏感)信息 - APIJSONApplication.init(); + APIJSONApplication.init(false); } + public static JSONParser DEFAULT_JSON_PARSER; + static { // 把以下需要用到的数据库驱动取消注释即可,如果这里没有可以自己新增 // try { //加载驱动程序 @@ -103,26 +107,75 @@ public static void main(String[] args) throws Exception { COMPILE_MAP.put("EMAIL", StringUtil.PATTERN_EMAIL); COMPILE_MAP.put("ID_CARD", StringUtil.PATTERN_ID_CARD); + // 使用 fastjson + apijson.JSON.JSON_OBJECT_CLASS = JSONObject.class; + apijson.JSON.JSON_ARRAY_CLASS = JSONArray.class; + + final Feature[] DEFAULT_FASTJSON_FEATURES = {Feature.OrderedField, Feature.UseBigDecimal}; + apijson.JSON.DEFAULT_JSON_PARSER = DEFAULT_JSON_PARSER = new JSONParser() { + + @Override + public JSONObject createJSONObject() { + return new JSONObject(true); + } + + @Override + public JSONArray createJSONArray() { + return new JSONArray(); + } + + @Override + public String toJSONString(Object obj) { + return obj == null || obj instanceof String ? (String) obj : JSON.toJSONString(obj); + } + + @Override + public Object parseJSON(Object json) { + return JSON.parse(toJSONString(json), DEFAULT_FASTJSON_FEATURES); + } + + @Override + public JSONObject parseObject(Object json) { + return JSON.parseObject(toJSONString(json), DEFAULT_FASTJSON_FEATURES); + } + + @Override + public T parseObject(Object json, Class clazz) { + return JSON.parseObject(toJSONString(json), clazz, DEFAULT_FASTJSON_FEATURES); + } + + @Override + public JSONArray parseArray(Object json) { + return JSON.parseArray(toJSONString(json)); + } + + @Override + public List parseArray(Object json, Class clazz) { + return JSON.parseArray(toJSONString(json), clazz); + } + + }; + // 使用本项目的自定义处理类 - APIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator() { + APIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator() { @Override - public Parser createParser() { + public DemoParser createParser() { return new DemoParser(); } @Override - public FunctionParser createFunctionParser() { + public DemoFunctionParser createFunctionParser() { return new DemoFunctionParser(); } @Override - public Verifier createVerifier() { + public DemoVerifier createVerifier() { return new DemoVerifier(); } @Override - public SQLConfig createSQLConfig() { + public DemoSQLConfig createSQLConfig() { return new DemoSQLConfig(); } diff --git a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/jfinal/DemoController.java b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/jfinal/DemoController.java index fdefb58..5381b85 100755 --- a/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/jfinal/DemoController.java +++ b/APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/jfinal/DemoController.java @@ -43,7 +43,13 @@ import javax.servlet.http.HttpSession; +import apijson.JSONResponse; +import apijson.Log; +import apijson.RequestMethod; +import apijson.StringUtil; +import apijson.demo.JSON; import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.JSONArray; import com.jfinal.aop.Before; import com.jfinal.core.ActionKey; import com.jfinal.core.Controller; @@ -51,11 +57,6 @@ import com.jfinal.ext.interceptor.POST; import com.jfinal.kit.HttpKit; -import apijson.JSON; -import apijson.JSONResponse; -import apijson.Log; -import apijson.RequestMethod; -import apijson.StringUtil; import apijson.demo.DemoFunctionParser; import apijson.demo.DemoParser; import apijson.demo.DemoVerifier; @@ -63,11 +64,8 @@ import apijson.demo.model.User; import apijson.demo.model.Verify; import apijson.framework.javax.APIJSONController; -import apijson.framework.javax.APIJSONParser; import apijson.framework.javax.BaseModel; -import apijson.orm.AbstractParser; import apijson.orm.JSONRequest; -import apijson.orm.Parser; import apijson.orm.exception.ConditionErrorException; import apijson.orm.exception.ConflictException; import apijson.orm.exception.NotExistException; @@ -88,17 +86,11 @@ public class DemoController extends Controller { private static final String TAG = "DemoController"; - public Parser newParser(HttpSession session, RequestMethod method) { - @SuppressWarnings("unchecked") - Parser parser = (Parser) APIJSONController.APIJSON_CREATOR.createParser(); + public DemoParser newParser(HttpSession session, RequestMethod method) { + DemoParser parser = (DemoParser) APIJSONController.APIJSON_CREATOR.createParser(); parser.setMethod(method); - if (parser instanceof APIJSONParser) { - ((APIJSONParser) parser).setSession(session); - } - // 可以更方便地通过日志排查错误 - if (parser instanceof AbstractParser) { - ((AbstractParser) parser).setRequestURL(getRequest().getRequestURL().toString()); - } + parser.setSession(session); + parser.setRequestURL(getRequest().getRequestURL().toString()); return parser; } @@ -123,8 +115,9 @@ public void parseAndResponse(RequestMethod method) { return; } + DemoParser parser = newParser(null, null); // /get/User, /gets/Moment[], /put/Comment:[] 等简版接口,APIJSON 4.8.0+ 可用,对不兼容的低版本需要注释以下代码 - JSONObject req = AbstractParser.wrapRequest(method, tag, JSON.parseObject(getRawData()), false); + JSONObject req = parser.wrapRequest(method, tag, JSON.parseObject(getRawData()), false, DemoAppConfig.DEFAULT_JSON_PARSER); if (req == null) { req = new JSONObject(true); } @@ -250,7 +243,6 @@ public void delete() { /**重新加载配置 - * @param request * @return * @see *
        @@ -263,6 +255,8 @@ public void delete() {
         	 */
         	@Before(POST.class)
         	public void reload() {
        +		DemoParser parser = new DemoParser();
        +
         		String request = HttpKit.readData(getRequest());
         		JSONObject requestObject = null;
         		String type;
        @@ -270,24 +264,24 @@ public void reload() {
         		String phone;
         		String verify;
         		try {
        -			requestObject = DemoParser.parseRequest(request);
        +			requestObject = JSON.parseObject(request);
         			type = requestObject.getString(TYPE);
         			value = requestObject.getJSONObject(VALUE);
         			phone = requestObject.getString(PHONE);
         			verify = requestObject.getString(VERIFY);
         		} catch (Exception e) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, e));
        +			renderJson(parser.extendErrorResult(requestObject, e));
         			return;
         		}
         
        -		JSONResponse response = new JSONResponse(headVerify(Verify.TYPE_RELOAD, phone, verify));
        -		response = response.getJSONResponse(VERIFY_);
        +		JSONResponse response = new JSONResponse<>(headVerify(Verify.TYPE_RELOAD, phone, verify));
        +		response = response.getJSONResponse(VERIFY_, DemoAppConfig.DEFAULT_JSON_PARSER);
         		if (JSONResponse.isExist(response) == false) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, new ConditionErrorException("手机号或验证码错误")));
        +			renderJson(parser.extendErrorResult(requestObject, new ConditionErrorException("手机号或验证码错误")));
         			return;
         		}
         
        -		JSONObject result = DemoParser.newSuccessResult();
        +		JSONObject result = (JSONObject) parser.newSuccessResult();
         
         		boolean reloadAll = StringUtil.isEmpty(type, true) || "ALL".equals(type);
         
        @@ -296,7 +290,7 @@ public void reload() {
         				result.put(ACCESS_, DemoVerifier.initAccess(false, null, value));
         			} catch (ServerException e) {
         				e.printStackTrace();
        -				result.put(ACCESS_, DemoParser.newErrorResult(e));
        +				result.put(ACCESS_, parser.newErrorResult(e));
         			}
         		}
         
        @@ -305,7 +299,7 @@ public void reload() {
         				result.put(FUNCTION_, DemoFunctionParser.init(false, null, value));
         			} catch (ServerException e) {
         				e.printStackTrace();
        -				result.put(FUNCTION_, DemoParser.newErrorResult(e));
        +				result.put(FUNCTION_, parser.newErrorResult(e));
         			}
         		}
         
        @@ -314,7 +308,7 @@ public void reload() {
         				result.put(REQUEST_, DemoVerifier.initRequest(false, null, value));
         			} catch (ServerException e) {
         				e.printStackTrace();
        -				result.put(REQUEST_, DemoParser.newErrorResult(e));
        +				result.put(REQUEST_, parser.newErrorResult(e));
         			}
         		}
         
        @@ -322,7 +316,6 @@ public void reload() {
         	}
         
         	/**生成验证码,修改为post请求
        -	 * @param request
         	 * @see
         	 * 
         		{
        @@ -334,16 +327,18 @@ public void reload() {
         	@Before(POST.class)
         	@ActionKey("post/verify")
         	public void postVerify() {
        +		DemoParser parser = new DemoParser();
        +
         		String request = HttpKit.readData(getRequest());
         		JSONObject requestObject = null;
         		int type;
         		String phone;
         		try {
        -			requestObject = DemoParser.parseRequest(request);
        +			requestObject = JSON.parseObject(request);
         			type = requestObject.getIntValue(TYPE);
         			phone = requestObject.getString(PHONE);
         		} catch (Exception e) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, e));
        +			renderJson(parser.extendErrorResult(requestObject, e));
         			return;
         		}
         
        @@ -351,7 +346,7 @@ public void postVerify() {
         
         		JSONObject response = new DemoParser(POST, false).parseResponse(
         				newVerifyRequest(type, phone, "" + (new Random().nextInt(9999) + 1000))
        -				);
        +		);
         
         		JSONObject verify = null;
         		try {
        @@ -359,7 +354,7 @@ public void postVerify() {
         		} catch (Exception e) {}
         
         		if (verify == null || JSONResponse.isSuccess(verify.getIntValue(JSONResponse.KEY_CODE)) == false) {
        -			new DemoParser(DELETE, false).parseResponse(new JSONRequest(new Verify(type, phone)));
        +			new DemoParser(DELETE, false).parseResponse((JSONObject) apijson.JSON.parseObject(new Verify(type, phone)));
         			renderJson(response);
         			return;
         		}
        @@ -372,7 +367,6 @@ public void postVerify() {
         	}
         
         	/**获取验证码
        -	 * @param request
         	 * @see
         	 * 
         		{
        @@ -389,21 +383,23 @@ public void getVerify() {
         
         	@NotAction
         	public JSONObject getVerify(String request) {
        +		DemoParser parser = new DemoParser(GETS, false);
        +
         		JSONObject requestObject = null;
         		int type;
         		String phone;
         		try {
        -			requestObject = DemoParser.parseRequest(request);
        +			requestObject = JSON.parseObject(request);
         			type = requestObject.getIntValue(TYPE);
         			phone = requestObject.getString(PHONE);
         		} catch (Exception e) {
        -			return DemoParser.extendErrorResult(requestObject, e);
        +			return parser.extendErrorResult(requestObject, e);
         		}
        -		return new DemoParser(GETS, false).parseResponse(newVerifyRequest(type, phone, null));
        +
        +		return parser.parseResponse(newVerifyRequest(type, phone, null));
         	}
         
         	/**校验验证码
        -	 * @param request
         	 * @see
         	 * 
         		{
        @@ -416,20 +412,23 @@ public JSONObject getVerify(String request) {
         	@Before(POST.class)
         	@ActionKey("heads/verify")
         	public void headVerify() {
        +		DemoParser parser = new DemoParser();
        +
         		String request = HttpKit.readData(getRequest());
         		JSONObject requestObject = null;
         		int type;
         		String phone;
         		String verify;
         		try {
        -			requestObject = DemoParser.parseRequest(request);
        +			requestObject = JSON.parseObject(request);
         			type = requestObject.getIntValue(TYPE);
         			phone = requestObject.getString(PHONE);
         			verify = requestObject.getString(VERIFY);
         		} catch (Exception e) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, e));
        +			renderJson(parser.extendErrorResult(requestObject, e));
         			return;
         		}
        +
         		renderJson(headVerify(type, phone, verify));
         	}
         
        @@ -442,17 +441,19 @@ public void headVerify() {
         	 */
         	@NotAction
         	public JSONObject headVerify(int type, String phone, String code) {
        -		JSONResponse response = new JSONResponse(
        +		DemoParser parser = new DemoParser();
        +
        +		JSONResponse response = new JSONResponse<>(
         				new DemoParser(GETS, false).parseResponse(
        -						new JSONRequest(
        +						(JSONObject) apijson.JSON.parseObject(new JSONRequest(
         								new Verify(type, phone)
         								.setVerify(code)
         								).setTag(VERIFY_)
        -						)
        +						))
         				);
         		Verify verify = response.getObject(Verify.class);
         		if (verify == null) {
        -			return DemoParser.newErrorResult(StringUtil.isEmpty(code, true)
        +			return parser.newErrorResult(StringUtil.isEmpty(code, true)
         					? new NotExistException("验证码不存在!") : new ConditionErrorException("手机号或验证码错误!"));
         		}
         
        @@ -461,16 +462,20 @@ public JSONObject headVerify(int type, String phone, String code) {
         		long now = System.currentTimeMillis();
         		if (now > 60*1000 + time) {
         			new DemoParser(DELETE, false).parseResponse(
        -					new JSONRequest(new Verify(type, phone)).setTag(VERIFY_)
        -					);
        -			return DemoParser.newErrorResult(new TimeoutException("验证码已过期!"));
        +					(JSONObject) apijson.JSON.parseObject(
        +							new JSONRequest(new Verify(type, phone)).setTag(VERIFY_)
        +					)
        +			);
        +			return parser.newErrorResult(new TimeoutException("验证码已过期!"));
         		}
         
        -		return new JSONResponse(
        +		return new JSONResponse<>(
         				new DemoParser(HEADS, false).parseResponse(
        -						new JSONRequest(new Verify(type, phone).setVerify(code)).setFormat(true)
        +						(JSONObject) apijson.JSON.parseObject(
        +								new JSONRequest(new Verify(type, phone).setVerify(code)).setFormat(true)
         						)
        -				);
        +				)
        +		).toObject(JSONObject.class);
         	}
         
         
        @@ -481,8 +486,10 @@ public JSONObject headVerify(int type, String phone, String code) {
         	 * @return
         	 */
         	@NotAction
        -	private apijson.JSONRequest newVerifyRequest(int type, String phone, String verify) {
        -		return new JSONRequest(new Verify(type, phone).setVerify(verify)).setTag(VERIFY_).setFormat(true);
        +	private JSONObject newVerifyRequest(int type, String phone, String verify) {
        +		JSONObject obj = new JSONObject(true);
        +		obj.putAll(new JSONRequest(new Verify(type, phone).setVerify(verify)).setTag(VERIFY_).setFormat(true));
        +		return obj;
         	}
         
         
        @@ -493,7 +500,6 @@ private apijson.JSONRequest newVerifyRequest(int type, String phone, String veri
         	public static final int LOGIN_TYPE_PASSWORD = 0;//密码登录
         	public static final int LOGIN_TYPE_VERIFY = 1;//验证码登录
         	/**用户登录
        -	 * @param request 只用String,避免encode后未decode
         	 * @return
         	 * @see
         	 * 
        @@ -507,6 +513,8 @@ private apijson.JSONRequest newVerifyRequest(int type, String phone, String veri
         	 */
         	@Before(POST.class)
         	public void login() {
        +		DemoParser parser = new DemoParser();
        +
         		String request = HttpKit.readData(getRequest());
         		HttpSession session = getSession();
         
        @@ -519,7 +527,7 @@ public void login() {
         		boolean remember;
         		JSONObject defaults;
         		try {
        -			requestObject = DemoParser.parseRequest(request);
        +			requestObject = JSON.parseObject(request);
         
         			isPassword = requestObject.getIntValue(TYPE) == LOGIN_TYPE_PASSWORD;//登录方式
         			phone = requestObject.getString(PHONE);//手机
        @@ -548,35 +556,33 @@ public void login() {
         			requestObject.remove(REMEMBER);
         			requestObject.remove(DEFAULTS);
         		} catch (Exception e) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, e));
        +			renderJson(parser.extendErrorResult(requestObject, e));
         			return;
         		}
         
        -
        -
         		//手机号是否已注册
         		JSONObject phoneResponse = new DemoParser(HEADS, false).parseResponse(
        -				new JSONRequest(
        -						new Privacy().setPhone(phone)
        -						)
        -				);
        +				(JSONObject) apijson.JSON.parseObject(new Privacy().setPhone(phone))
        +		);
         		if (JSONResponse.isSuccess(phoneResponse) == false) {
        -			renderJson(DemoParser.newResult(phoneResponse.getIntValue(JSONResponse.KEY_CODE), phoneResponse.getString(JSONResponse.KEY_MSG)));
        +			renderJson(parser.newResult(phoneResponse.getIntValue(JSONResponse.KEY_CODE), phoneResponse.getString(JSONResponse.KEY_MSG)));
         			return;
         		}
        -		JSONResponse response = new JSONResponse(phoneResponse).getJSONResponse(PRIVACY_);
        +		JSONResponse response = new JSONResponse(phoneResponse).getJSONResponse(PRIVACY_);
         		if(JSONResponse.isExist(response) == false) {
        -			renderJson(DemoParser.newErrorResult(new NotExistException("手机号未注册")));
        +			renderJson(parser.newErrorResult(new NotExistException("手机号未注册")));
         			return;
         		}
         
         		//根据phone获取User
         		JSONObject privacyResponse = new DemoParser(GETS, false).parseResponse(
        -				new JSONRequest(
        -						new Privacy().setPhone(phone)
        +				(JSONObject) apijson.JSON.parseObject(
        +						new JSONRequest(
        +								new Privacy().setPhone(phone)
         						).setFormat(true)
        -				);
        -		response = new JSONResponse(privacyResponse);
        +				)
        +		);
        +		response = new JSONResponse<>(privacyResponse);
         
         		Privacy privacy = response == null ? null : response.getObject(Privacy.class);
         		long userId = privacy == null ? 0 : BaseModel.value(privacy.getId());
        @@ -587,13 +593,15 @@ public void login() {
         
         		//校验凭证 
         		if (isPassword) {//password密码登录
        -			response = new JSONResponse(
        +			response = new JSONResponse<>(
         					new DemoParser(HEADS, false).parseResponse(
        -							new JSONRequest(new Privacy(userId).setPassword(password))
        +							(JSONObject) apijson.JSON.parseObject(
        +									new Privacy(userId).setPassword(password)
         							)
        -					);
        +					)
        +			);
         		} else {//verify手机验证码登录
        -			response = new JSONResponse(headVerify(Verify.TYPE_LOGIN, phone, password));
        +			response = new JSONResponse<>(headVerify(Verify.TYPE_LOGIN, phone, password));
         		}
         		if (JSONResponse.isSuccess(response) == false) {
         			renderJson(response);
        @@ -601,23 +609,23 @@ public void login() {
         		}
         		response = response.getJSONResponse(isPassword ? PRIVACY_ : VERIFY_);
         		if (JSONResponse.isExist(response) == false) {
        -			renderJson(DemoParser.newErrorResult(new ConditionErrorException("账号或密码错误")));
        +			renderJson(parser.newErrorResult(new ConditionErrorException("账号或密码错误")));
         			return;
         		}
         
        -		response = new JSONResponse(
        +		response = new JSONResponse<>(
         				new DemoParser(GETS, false).parseResponse(
        -						new JSONRequest(  // 兼容 MySQL 5.6 及以下等不支持 json 类型的数据库
        +						JSON.parseObject(new JSONRequest(  // 兼容 MySQL 5.6 及以下等不支持 json 类型的数据库
         								USER_,  // User 里在 setContactIdList(List) 后加 setContactIdList(String) 没用
        -								new apijson.JSONObject(  // fastjson 查到一个就不继续了,所以只能加到前面或者只有这一个,但这样反过来不兼容 5.7+
        +								new JSONRequest(  // fastjson 查到一个就不继续了,所以只能加到前面或者只有这一个,但这样反过来不兼容 5.7+
         										new User(userId)  // 所以就用 @json 来强制转为 JSONArray,保证有效
         										).setJson("contactIdList,pictureList")
         								).setFormat(true)
        -						)
        +						))
         				);
        -		User user = response.getObject(User.class);
        +		User user = (User) response.getObject(User.class, DemoAppConfig.DEFAULT_JSON_PARSER);
         		if (user == null || BaseModel.value(user.getId()) != userId) {
        -			renderJson(DemoParser.newErrorResult(new NullPointerException("服务器内部错误")));
        +			renderJson(parser.newErrorResult(new NullPointerException("服务器内部错误")));
         			return;
         		}
         
        @@ -641,11 +649,12 @@ public void login() {
         	}
         
         	/**退出登录,清空session
        -	 * @param session
         	 * @return
         	 */
         	@Before(POST.class)
         	public void logout() {
        +		DemoParser parser = new DemoParser();
        +
         		HttpSession session = getSession();
         		long userId;
         		try {
        @@ -653,12 +662,12 @@ public void logout() {
         			Log.d(TAG, "logout  userId = " + userId + "; session.getId() = " + (session == null ? null : session.getId()));
         			session.invalidate();
         		} catch (Exception e) {
        -			renderJson(DemoParser.newErrorResult(e));
        +			renderJson(parser.newErrorResult(e));
         			return;
         		}
         
        -		JSONObject result = DemoParser.newSuccessResult();
        -		JSONObject user = DemoParser.newSuccessResult();
        +		JSONObject result = parser.newSuccessResult();
        +		JSONObject user = parser.newSuccessResult();
         		user.put(ID, userId);
         		user.put(COUNT, 1);
         		result.put(StringUtil.firstCase(USER_), user);
        @@ -669,7 +678,6 @@ public void logout() {
         
         	private static final String REGISTER = "register";
         	/**注册
        -	 * @param request 只用String,避免encode后未decode
         	 * @return
         	 * @see
         	 * 
        @@ -687,6 +695,8 @@ public void logout() {
         	 */
         	@Before(POST.class)
         	public void register() {
        +		DemoParser parser = new DemoParser();
        +
         		String request = HttpKit.readData(getRequest());
         		JSONObject requestObject = null;
         
        @@ -696,7 +706,7 @@ public void register() {
         		String verify;
         		String password;
         		try {
        -			requestObject = DemoParser.parseRequest(request);
        +			requestObject = JSON.parseObject(request);
         			privacyObj = requestObject.getJSONObject(PRIVACY_);
         
         			phone = StringUtil.getString(privacyObj.getString(PHONE));
        @@ -716,30 +726,28 @@ public void register() {
         				return;
         			}
         		} catch (Exception e) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, e));
        +			renderJson(parser.extendErrorResult(requestObject, e));
         			return;
         		}
         
         
        -		JSONResponse response = new JSONResponse(headVerify(Verify.TYPE_REGISTER, phone, verify));
        +		JSONResponse response = new JSONResponse<>(headVerify(Verify.TYPE_REGISTER, phone, verify));
         		if (JSONResponse.isSuccess(response) == false) {
         			renderJson(response);
         			return;
         		}
         		//手机号或验证码错误
         		if (JSONResponse.isExist(response.getJSONResponse(VERIFY_)) == false) {
        -			renderJson(DemoParser.extendErrorResult(response, new ConditionErrorException("手机号或验证码错误!")));
        +			renderJson(parser.extendErrorResult(response.toObject(JSONObject.class), new ConditionErrorException("手机号或验证码错误!")));
         			return;
         		}
         
        -
        -
         		//生成User和Privacy
        -		if (StringUtil.isEmpty(requestObject.getString(JSONRequest.KEY_TAG), true)) {
        -			requestObject.put(JSONRequest.KEY_TAG, REGISTER);
        +		if (StringUtil.isEmpty(requestObject.getString(apijson.JSONRequest.KEY_TAG), true)) {
        +			requestObject.put(apijson.JSONRequest.KEY_TAG, REGISTER);
         		}
        -		requestObject.put(JSONRequest.KEY_FORMAT, true);
        -		response = new JSONResponse( 
        +		requestObject.put(apijson.JSONRequest.KEY_FORMAT, true);
        +		response = new JSONResponse<>( 
         				new DemoParser(POST).setNeedVerifyLogin(false).parseResponse(requestObject)
         				);
         
        @@ -755,11 +763,11 @@ public void register() {
         
         		if (e != null) { //出现错误,回退
         			new DemoParser(DELETE, false).parseResponse(
        -					new JSONRequest(new User(userId))
        -					);
        +					JSON.parseObject(new User(userId))
        +			);
         			new DemoParser(DELETE, false).parseResponse(
        -					new JSONRequest(new Privacy(userId2))
        -					);
        +					JSON.parseObject(new Privacy(userId2))
        +			);
         		}
         
         		renderJson(response);
        @@ -783,13 +791,13 @@ public static JSONObject newIllegalArgumentResult(JSONObject requestObject, Stri
         	 */
         	@NotAction
         	public static JSONObject newIllegalArgumentResult(JSONObject requestObject, String key, String msg) {
        -		return DemoParser.extendErrorResult(requestObject
        +		DemoParser parser = new DemoParser();
        +		return parser.extendErrorResult(requestObject
         				, new IllegalArgumentException(key + ":value 中value不合法!" + StringUtil.getString(msg)));
         	}
         
         
         	/**设置密码
        -	 * @param request 只用String,避免encode后未decode
         	 * @return
         	 * @see
         	 * 
        @@ -814,6 +822,8 @@ public static JSONObject newIllegalArgumentResult(JSONObject requestObject, Stri
         	@Before(POST.class)
         	@ActionKey("put/password")
         	public void putPassword() {
        +		DemoParser parser = new DemoParser();
        +
         		String request = HttpKit.readData(getRequest());
         
         		JSONObject requestObject = null;
        @@ -854,18 +864,18 @@ public void putPassword() {
         				}
         			}
         		} catch (Exception e) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, e));
        +			renderJson(parser.extendErrorResult(requestObject, e));
         			return;
         		}
         
         
         		if (StringUtil.isPassword(oldPassword)) {
         			if (userId <= 0) { //手机号+验证码不需要userId
        -				renderJson(DemoParser.extendErrorResult(requestObject, new IllegalArgumentException(ID + ":value 中value不合法!")));
        +				renderJson(parser.extendErrorResult(requestObject, new IllegalArgumentException(ID + ":value 中value不合法!")));
         				return;
         			}
         			if (oldPassword.equals(password)) {
        -				renderJson(DemoParser.extendErrorResult(requestObject, new ConflictException("新旧密码不能一样!")));
        +				renderJson(parser.extendErrorResult(requestObject, new ConflictException("新旧密码不能一样!")));
         				return;
         			}
         
        @@ -876,33 +886,33 @@ public void putPassword() {
         			} else {
         				privacy.setPayPassword(oldPassword);
         			}
        -			JSONResponse response = new JSONResponse( 
        +			JSONResponse response = new JSONResponse<>( 
         					new DemoParser(HEAD, false).parseResponse(
        -							new JSONRequest(privacy).setFormat(true)
        -							)
        -					);
        +							JSON.parseObject(new JSONRequest(privacy).setFormat(true))
        +					)
        +			);
         			if (JSONResponse.isExist(response.getJSONResponse(PRIVACY_)) == false) {
        -				renderJson(DemoParser.extendErrorResult(requestObject, new ConditionErrorException("账号或原密码错误,请重新输入!")));
        +				renderJson(parser.extendErrorResult(requestObject, new ConditionErrorException("账号或原密码错误,请重新输入!")));
         				return;
         			}
         		}
         		else if (StringUtil.isPhone(phone) && StringUtil.isVerify(verify)) {
        -			JSONResponse response = new JSONResponse(headVerify(type, phone, verify));
        +			JSONResponse response = new JSONResponse<>(headVerify(type, phone, verify));
         			if (JSONResponse.isSuccess(response) == false) {
         				renderJson(response);
         				return;
         			}
         			if (JSONResponse.isExist(response.getJSONResponse(VERIFY_)) == false) {
        -				renderJson(DemoParser.extendErrorResult(response, new ConditionErrorException("手机号或验证码错误!")));
        +				renderJson(parser.extendErrorResult(response.toObject(JSONObject.class), new ConditionErrorException("手机号或验证码错误!")));
         				return;
         			}
        -			response = new JSONResponse(
        +			response = new JSONResponse<>(
         					new DemoParser(GET, false).parseResponse(
        -							new JSONRequest(
        +							JSON.parseObject(
         									new Privacy().setPhone(phone)
        -									)
         							)
        -					);
        +					)
        +			);
         			Privacy privacy = response.getObject(Privacy.class);
         			long id = privacy == null ? 0 : BaseModel.value(privacy.getId());
         			privacyObj.remove(PHONE);
        @@ -910,14 +920,14 @@ else if (StringUtil.isPhone(phone) && StringUtil.isVerify(verify)) {
         
         			requestObject.put(PRIVACY_, privacyObj);
         		} else {
        -			renderJson(DemoParser.extendErrorResult(requestObject, new IllegalArgumentException("请输入合法的 旧密码 或 手机号+验证码 !")));
        +			renderJson(parser.extendErrorResult(requestObject, new IllegalArgumentException("请输入合法的 旧密码 或 手机号+验证码 !")));
         			return;
         		}
         		//TODO 上线版加上   password = MD5Util.MD5(password);
         
         
        -		//		requestObject.put(JSONRequest.KEY_TAG, "Password");
        -		requestObject.put(JSONRequest.KEY_FORMAT, true);
        +		//		requestObject.put(apijson.JSONRequest.KEY_TAG, "Password");
        +		requestObject.put(apijson.JSONRequest.KEY_FORMAT, true);
         
         		//修改密码
         		renderJson(new DemoParser(PUT, false).parseResponse(requestObject));
        @@ -926,9 +936,6 @@ else if (StringUtil.isPhone(phone) && StringUtil.isVerify(verify)) {
         
         
         	/**充值/提现
        -	 * @param request 只用String,避免encode后未decode
        -	 * @param session
        -	 * @return
         	 * @see
         	 * 
         		{
        @@ -943,6 +950,8 @@ else if (StringUtil.isPhone(phone) && StringUtil.isVerify(verify)) {
         	@Before(POST.class)
         	@ActionKey("put/balance")
         	public void putBalance() {
        +		DemoParser parser = new DemoParser();
        +
         		String request = HttpKit.readData(getRequest());
         		HttpSession session = getSession();
         		JSONObject requestObject = null;
        @@ -969,21 +978,21 @@ public void putBalance() {
         				throw new IllegalArgumentException(PRIVACY_ + "." + _PAY_PASSWORD + ":value 中value不合法!");
         			}
         		} catch (Exception e) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, e));
        +			renderJson(parser.extendErrorResult(requestObject, e));
         			return;
         		}
         
         		//验证密码<<<<<<<<<<<<<<<<<<<<<<<
         
         		privacyObj.remove("balance+");
        -		JSONResponse response = new JSONResponse(
        +		JSONResponse response = new JSONResponse<>(
         				new DemoParser(HEADS, false).setSession(session).parseResponse(
        -						new JSONRequest(PRIVACY_, privacyObj)
        +						JSON.createJSONObject(PRIVACY_, privacyObj)
         						)
         				);
         		response = response.getJSONResponse(PRIVACY_);
         		if (JSONResponse.isExist(response) == false) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, new ConditionErrorException("支付密码错误!")));
        +			renderJson(parser.extendErrorResult(requestObject, new ConditionErrorException("支付密码错误!")));
         			return;
         		}
         
        @@ -993,33 +1002,33 @@ public void putBalance() {
         		//验证金额范围<<<<<<<<<<<<<<<<<<<<<<<
         
         		if (change == 0) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, new OutOfRangeException("balance+的值不能为0!")));
        +			renderJson(parser.extendErrorResult(requestObject, new OutOfRangeException("balance+的值不能为0!")));
         			return;
         		}
         		if (Math.abs(change) > 10000) {
        -			renderJson(DemoParser.extendErrorResult(requestObject, new OutOfRangeException("单次 充值/提现 的金额不能超过10000元!")));
        +			renderJson(parser.extendErrorResult(requestObject, new OutOfRangeException("单次 充值/提现 的金额不能超过10000元!")));
         			return;
         		}
         
         		//验证金额范围>>>>>>>>>>>>>>>>>>>>>>>>
         
         		if (change < 0) {//提现
        -			response = new JSONResponse(
        +			response = new JSONResponse<>(
         					new DemoParser(GETS, false).parseResponse(
        -							new JSONRequest(
        +							JSON.parseObject(
         									new Privacy(userId)
        -									)
         							)
        -					);
        +					)
        +			);
         			Privacy privacy = response == null ? null : response.getObject(Privacy.class);
         			long id = privacy == null ? 0 : BaseModel.value(privacy.getId());
         			if (id != userId) {
        -				renderJson(DemoParser.extendErrorResult(requestObject, new Exception("服务器内部错误!")));
        +				renderJson(parser.extendErrorResult(requestObject, new Exception("服务器内部错误!")));
         				return;
         			}
         
         			if (BaseModel.value(privacy.getBalance()) < -change) {
        -				renderJson(DemoParser.extendErrorResult(requestObject, new OutOfRangeException("余额不足!")));
        +				renderJson(parser.extendErrorResult(requestObject, new OutOfRangeException("余额不足!")));
         				return;
         			}
         		}
        @@ -1028,8 +1037,8 @@ public void putBalance() {
         		privacyObj.remove(_PAY_PASSWORD);
         		privacyObj.put("balance+", change);
         		requestObject.put(PRIVACY_, privacyObj);
        -		requestObject.put(JSONRequest.KEY_TAG, PRIVACY_);
        -		requestObject.put(JSONRequest.KEY_FORMAT, true);
        +		requestObject.put(apijson.JSONRequest.KEY_TAG, PRIVACY_);
        +		requestObject.put(apijson.JSONRequest.KEY_FORMAT, true);
         		//不免验证,里面会验证身份
         		renderJson(new DemoParser(PUT).setSession(session).parseResponse(requestObject));
         	}
        
        From 2713ed9df15a41cdcd40042380e09bb7f6bb639a Mon Sep 17 00:00:00 2001
        From: TommyLemon 
        Date: Sun, 13 Apr 2025 01:32:17 +0800
        Subject: [PATCH 17/47] =?UTF-8?q?Java=EF=BC=9AMultiDataSource=20=E5=8D=87?=
         =?UTF-8?q?=E7=BA=A7=20APIJSON=208,=20apijson-framework=207.2=20=E5=92=8C?=
         =?UTF-8?q?=20MySQL-JDBC=209.2=EF=BC=8C=E6=9B=B4=E6=96=B0=20APIAuto?=
        MIME-Version: 1.0
        Content-Type: text/plain; charset=UTF-8
        Content-Transfer-Encoding: 8bit
        
        ---
         .../APIJSONBoot-MultiDataSource/pom.xml       |  60 ++--
         .../java/apijson/boot/DemoApplication.java    | 250 +++++++++-------
         .../java/apijson/boot/DemoController.java     | 272 +++++++++---------
         .../java/apijson/boot/FileController.java     |   6 +-
         .../java/apijson/demo/DemoFunctionParser.java |  16 +-
         .../java/apijson/demo/DemoObjectParser.java   |   9 +-
         .../main/java/apijson/demo/DemoParser.java    |  72 +++--
         .../main/java/apijson/demo/DemoSQLConfig.java | 198 ++++++-------
         .../java/apijson/demo/DemoSQLExecutor.java    |  41 +--
         .../main/java/apijson/demo/DemoVerifier.java  |   6 +-
         .../resources/static/api/apijson/CodeUtil.js  |  26 +-
         .../static/api/apijson/JSONRequest.js         |   8 +-
         .../static/api/apijson/JSONResponse.js        |   6 +-
         .../src/main/resources/static/api/index.html  |   6 +-
         .../main/resources/static/api/js/jquery.js    |   4 +-
         .../static/api/js/localforage.min.js          |   2 +-
         .../src/main/resources/static/api/js/main.js  | 106 +++----
         .../main/resources/static/api/js/server.js    |   8 +-
         .../md/lib/codemirror/mode/rust/index.html    |   2 +-
         .../resources/static/api/md/lib/jquery.min.js |   2 +-
         .../src/main/resources/static/sql/README.md   |   2 +-
         .../resources/static/sql/apijson/CodeUtil.js  |  24 +-
         .../static/sql/apijson/JSONRequest.js         |   8 +-
         .../static/sql/apijson/JSONResponse.js        |   4 +-
         .../src/main/resources/static/sql/index.html  |   2 +-
         .../main/resources/static/sql/js/jquery.js    |   4 +-
         .../static/sql/js/localforage.min.js          |   2 +-
         .../src/main/resources/static/sql/js/main.js  | 108 +++----
         .../main/resources/static/sql/js/server.js    |   8 +-
         .../md/lib/codemirror/mode/rust/index.html    |   2 +-
         .../resources/static/sql/md/lib/jquery.min.js |   2 +-
         .../resources/static/ui/apijson/CodeUtil.js   |  22 +-
         .../static/ui/apijson/JSONRequest.js          |   8 +-
         .../static/ui/apijson/JSONResponse.js         |   2 +-
         .../src/main/resources/static/ui/index.html   |   2 +-
         .../src/main/resources/static/ui/js/jquery.js |   4 +-
         .../resources/static/ui/js/localforage.min.js |   2 +-
         .../src/main/resources/static/ui/js/main.js   |  60 ++--
         .../ui/md/lib/codemirror/mode/rust/index.html |   2 +-
         .../resources/static/ui/md/lib/jquery.min.js  |   2 +-
         .../resources/static/unit/apijson/CodeUtil.js |  26 +-
         .../static/unit/apijson/JSONRequest.js        |   8 +-
         .../static/unit/apijson/JSONResponse.js       |   8 +-
         .../src/main/resources/static/unit/index.html |   2 +-
         .../main/resources/static/unit/js/jquery.js   |   4 +-
         .../static/unit/js/localforage.min.js         |   2 +-
         .../src/main/resources/static/unit/js/main.js |  88 +++---
         .../main/resources/static/unit/js/server.js   |   8 +-
         .../md/lib/codemirror/mode/rust/index.html    |   2 +-
         .../static/unit/md/lib/jquery.min.js          |   2 +-
         50 files changed, 815 insertions(+), 705 deletions(-)
        
        diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml
        index dc42bea..3533dad 100755
        --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml
        +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml
        @@ -56,26 +56,44 @@
         
         
                 
        -        
        -            com.github.Tencent
        -            APIJSON
        -            7.5.5
        -        
        -        
        -            com.github.APIJSON
        -            apijson-framework
        -            7.1.7
        -        
        -        
        -            com.github.APIJSON
        -            apijson-column
        -            2.1.5
        -        
        -        
        -            com.github.APIJSON
        -            apijson-router
        -            2.1.7
        -        
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
         
         
         
        @@ -167,7 +185,7 @@
                 
                     com.mysql
                     mysql-connector-j
        -            8.4.0
        +            9.2.0
                 
                 
                     org.postgresql
        diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java
        index 53d9515..cb89f31 100755
        --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java
        +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java
        @@ -14,9 +14,12 @@
         
         package apijson.boot;
         
        +import apijson.JSONParser;
         import apijson.framework.APIJSONSQLConfig;
         import com.alibaba.fastjson.JSON;
        +import com.alibaba.fastjson.JSONArray;
         import com.alibaba.fastjson.JSONObject;
        +import com.alibaba.fastjson.parser.Feature;
         import com.alibaba.fastjson.serializer.PropertyFilter;
         
         import org.springframework.boot.SpringApplication;
        @@ -54,11 +57,11 @@
         import apijson.orm.SQLExecutor;
         import apijson.orm.Verifier;
         import apijson.router.APIJSONRouterApplication;
        -import unitauto.MethodUtil;
        -import unitauto.MethodUtil.Argument;
        -import unitauto.MethodUtil.InstanceGetter;
        -import unitauto.MethodUtil.JSONCallback;
        -import unitauto.jar.UnitAutoApp;
        +//import unitauto.MethodUtil;
        +//import unitauto.MethodUtil.Argument;
        +//import unitauto.MethodUtil.InstanceGetter;
        +//import unitauto.MethodUtil.JSONCallback;
        +//import unitauto.jar.UnitAutoApp;
         
         
         /**
        @@ -91,12 +94,13 @@ public static void main(String[] args) throws Exception {
         
                 // FIXME 不要开放给项目组后端之外的任何人使用 UnitAuto(强制登录鉴权)!!!如果不需要单元测试则移除相关代码或 unitauto.Log.DEBUG = false;
                 // 上线生产环境前改为 false,可不输出 APIJSONORM 的日志 以及 SQLException 的原始(敏感)信息
        -        unitauto.Log.DEBUG = Log.DEBUG = true; // 是否开启调试模式(打印详细日志、返回详细调试信息等)
        +        //unitauto.Log.DEBUG = true;
        +        Log.DEBUG = true; // 是否开启调试模式(打印详细日志、返回详细调试信息等)
                 APIJSONParser.IS_PRINT_BIG_LOG = true; // 是否打印大日志
         //        APIJSONParser.IS_START_FROM_1 = true; // 分页页码是否从 1 开始,true - 从 1 开始;false - 从 0 开始
         //        APIJSONSQLConfig.ENABLE_COLUMN_CONFIG = true; // apijson-framework 已集成字段插件 apijson-column,支持 !key 反选字段 和 字段名映射
        -        APIJSONApplication.init();
        -        APIJSONRouterApplication.init();
        +        APIJSONApplication.init(false);
        +        APIJSONRouterApplication.init(false);
                 System.out.println("\n\n<<<<<<<<< 本 Demo 在 resources/static 内置了 APIAuto,Chrome/Firefox 打开 http://localhost:8080 即可调试(端口号根据项目配置而定) ^_^ >>>>>>>>>\n");
             }
         
        @@ -122,6 +126,7 @@ public void addCorsMappings(CorsRegistry registry) {
                 };
             }
         
        +    private static final JSONParser DEFAULT_JSON_PARSER;
             static {
                 // 把以下需要用到的数据库驱动取消注释即可,如果这里没有可以自己新增
                 //		try { //加载驱动程序
        @@ -239,132 +244,181 @@ public void addCorsMappings(CorsRegistry registry) {
                 COMPILE_MAP.put("EMAIL", StringUtil.PATTERN_EMAIL);
                 COMPILE_MAP.put("ID_CARD", StringUtil.PATTERN_ID_CARD);
         
        -        // 使用本项目的自定义处理类
        -        APIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator() {
        +        // 使用 fastjson
        +        apijson.JSON.JSON_OBJECT_CLASS = JSONObject.class;
        +        apijson.JSON.JSON_ARRAY_CLASS = JSONArray.class;
        +
        +        final Feature[] DEFAULT_FASTJSON_FEATURES = {Feature.OrderedField, Feature.UseBigDecimal};
        +        apijson.JSON.DEFAULT_JSON_PARSER = DEFAULT_JSON_PARSER = new JSONParser() {
         
                     @Override
        -            public Parser createParser() {
        -                return new DemoParser();
        +            public JSONObject createJSONObject() {
        +                return new JSONObject(true);
                     }
         
                     @Override
        -            public FunctionParser createFunctionParser() {
        -                return new DemoFunctionParser();
        +            public JSONArray createJSONArray() {
        +                return new JSONArray();
                     }
         
                     @Override
        -            public Verifier createVerifier() {
        -                return new DemoVerifier();
        +            public String toJSONString(Object obj, boolean format) {
        +                return obj == null || obj instanceof String ? (String) obj : JSON.toJSONString(obj);
                     }
         
                     @Override
        -            public SQLConfig createSQLConfig() {
        -                return new DemoSQLConfig();
        +            public Object parseJSON(Object json) {
        +                return JSON.parse(toJSONString(json), DEFAULT_FASTJSON_FEATURES);
                     }
         
                     @Override
        -            public SQLExecutor createSQLExecutor() {
        -                return new DemoSQLExecutor();
        +            public JSONObject parseObject(Object json) {
        +                return JSON.parseObject(toJSONString(json), DEFAULT_FASTJSON_FEATURES);
                     }
         
        -        };
        +            @Override
        +            public  T parseObject(Object json, Class clazz) {
        +                return JSON.parseObject(toJSONString(json), clazz, DEFAULT_FASTJSON_FEATURES);
        +            }
         
        -        // APIJSON 配置 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
        +            @Override
        +            public JSONArray parseArray(Object json) {
        +                return JSON.parseArray(toJSONString(json));
        +            }
         
        +            @Override
        +            public  List parseArray(Object json, Class clazz) {
        +                return JSON.parseArray(toJSONString(json), clazz);
        +            }
         
        -        // UnitAuto 单元测试配置  https://github.com/TommyLemon/UnitAuto  <<<<<<<<<<<<<<<<<<<<<<<<<<<
        -        // FIXME 不要开放给项目组后端之外的任何人使用 UnitAuto(强制登录鉴权)!!!如果不需要单元测试则移除相关代码或 unitauto.Log.DEBUG = false;
        -        UnitAutoApp.init();
        +        };
         
        -        // 适配 Spring 注入的类及 Context 等环境相关的类
        -        final InstanceGetter ig = MethodUtil.INSTANCE_GETTER;
        -        MethodUtil.INSTANCE_GETTER = new InstanceGetter() {
        +        // 使用本项目的自定义处理类
        +        APIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator() {
         
                     @Override
        -            public Object getInstance(@NotNull Class clazz, List classArgs, Boolean reuse) throws Exception {
        -                if (APPLICATION_CONTEXT != null && ApplicationContext.class.isAssignableFrom(clazz) && clazz.isAssignableFrom(APPLICATION_CONTEXT.getClass())) {
        -                    return APPLICATION_CONTEXT;
        -                }
        -
        -                if (reuse != null && reuse && (classArgs == null || classArgs.isEmpty())) {
        -                    return APPLICATION_CONTEXT.getBean(clazz);
        -                }
        -
        -                return ig.getInstance(clazz, classArgs, reuse);
        +            public DemoParser createParser() {
        +                return new DemoParser();
                     }
        -        };
         
        -        // 排除转换 JSON 异常的类,一般是 Context 等环境相关的类
        -        final JSONCallback jc = MethodUtil.JSON_CALLBACK;
        -        MethodUtil.JSON_CALLBACK = new JSONCallback() {
        +            @Override
        +            public DemoFunctionParser createFunctionParser() {
        +                return new DemoFunctionParser();
        +            }
         
                     @Override
        -            public JSONObject newSuccessResult() {
        -                return jc.newSuccessResult();
        +            public DemoVerifier createVerifier() {
        +                return new DemoVerifier();
                     }
         
                     @Override
        -            public JSONObject newErrorResult(Throwable e) {
        -                return jc.newErrorResult(e);
        +            public DemoSQLConfig createSQLConfig() {
        +                return new DemoSQLConfig();
                     }
         
                     @Override
        -            public JSONObject parseJSON(String type, Object value) {
        -                if (value == null || unitauto.JSON.isBooleanOrNumberOrString(value) || value instanceof JSON || value instanceof Enum) {
        -                    return jc.parseJSON(type, value);
        -                }
        -
        -                if (value instanceof ApplicationContext
        -                        || value instanceof Context
        -                        || value instanceof org.apache.catalina.Context
        -                    // SpringBoot 2.6.7 已移除  || value instanceof ch.qos.logback.core.Context
        -                ) {
        -                    value = value.toString();
        -                } else {
        -                    try {
        -                        value = JSON.parse(JSON.toJSONString(value, new PropertyFilter() {
        -                            @Override
        -                            public boolean apply(Object object, String name, Object value) {
        -                                if (value == null) {
        -                                    return true;
        -                                }
        -
        -                                if (value instanceof ApplicationContext
        -                                        || value instanceof Context
        -                                        || value instanceof org.apache.catalina.Context
        -                                    // SpringBoot 2.6.7 已移除  || value instanceof ch.qos.logback.core.Context
        -                                ) {
        -                                    return false;
        -                                }
        -
        -                                // 防止通过 UnitAuto 远程执行 getDBPassword 等方法来查到敏感信息,但如果直接调用 public String getDBUri 这里没法拦截,仍然会返回敏感信息
        -                                //	if (object instanceof SQLConfig) {
        -                                //		// 这个类部分方法不序列化返回
        -                                //		if ("dBUri".equalsIgnoreCase(name) || "dBPassword".equalsIgnoreCase(name) || "dBAccount".equalsIgnoreCase(name)) {
        -                                //			return false;
        -                                //		}
        -                                //		return false;  // 这个类所有方法都不序列化返回
        -                                //	}
        -
        -                                // 所有类中的方法只要包含关键词就不序列化返回
        -                                String n = StringUtil.toLowerCase(name);
        -                                if (n.contains("database") || n.contains("schema") || n.contains("dburi") || n.contains("password") || n.contains("account")) {
        -                                    return false;
        -                                }
        -
        -                                return Modifier.isPublic(value.getClass().getModifiers());
        -                            }
        -                        }));
        -                    } catch (Exception e) {
        -                        Log.e(TAG, "toJSONString  catch \n" + e.getMessage());
        -                    }
        -                }
        -
        -                return jc.parseJSON(type, value);
        +            public DemoSQLExecutor createSQLExecutor() {
        +                return new DemoSQLExecutor();
                     }
         
                 };
         
        +        // APIJSON 配置 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
        +
        +
        +        // UnitAuto 单元测试配置  https://github.com/TommyLemon/UnitAuto  <<<<<<<<<<<<<<<<<<<<<<<<<<<
        +        // FIXME 不要开放给项目组后端之外的任何人使用 UnitAuto(强制登录鉴权)!!!如果不需要单元测试则移除相关代码或 unitauto.Log.DEBUG = false;
        +        //UnitAutoApp.init();
        +
        +        // 适配 Spring 注入的类及 Context 等环境相关的类
        +        //final InstanceGetter ig = MethodUtil.INSTANCE_GETTER;
        +        //MethodUtil.INSTANCE_GETTER = new InstanceGetter() {
        +        //
        +        //    @Override
        +        //    public Object getInstance(@NotNull Class clazz, List classArgs, Boolean reuse) throws Exception {
        +        //        if (APPLICATION_CONTEXT != null && ApplicationContext.class.isAssignableFrom(clazz) && clazz.isAssignableFrom(APPLICATION_CONTEXT.getClass())) {
        +        //            return APPLICATION_CONTEXT;
        +        //        }
        +        //
        +        //        if (reuse != null && reuse && (classArgs == null || classArgs.isEmpty())) {
        +        //            return APPLICATION_CONTEXT.getBean(clazz);
        +        //        }
        +        //
        +        //        return ig.getInstance(clazz, classArgs, reuse);
        +        //    }
        +        //};
        +        //
        +        //// 排除转换 JSON 异常的类,一般是 Context 等环境相关的类
        +        //final JSONCallback jc = MethodUtil.JSON_CALLBACK;
        +        //MethodUtil.JSON_CALLBACK = new JSONCallback() {
        +        //
        +        //    @Override
        +        //    public JSONObject newSuccessResult() {
        +        //        return jc.newSuccessResult();
        +        //    }
        +        //
        +        //    @Override
        +        //    public JSONObject newErrorResult(Throwable e) {
        +        //        return jc.newErrorResult(e);
        +        //    }
        +        //
        +        //    @Override
        +        //    public JSONObject parseJSON(String type, Object value) {
        +        //        if (value == null || unitauto.JSON.isBooleanOrNumberOrString(value) || value instanceof JSON || value instanceof Enum) {
        +        //            return jc.parseJSON(type, value);
        +        //        }
        +        //
        +        //        if (value instanceof ApplicationContext
        +        //                || value instanceof Context
        +        //                || value instanceof org.apache.catalina.Context
        +        //            // SpringBoot 2.6.7 已移除  || value instanceof ch.qos.logback.core.Context
        +        //        ) {
        +        //            value = value.toString();
        +        //        } else {
        +        //            try {
        +        //                value = parseJSON(JSON.toJSONString(value, new PropertyFilter() {
        +        //                    @Override
        +        //                    public boolean apply(Object object, String name, Object value) {
        +        //                        if (value == null) {
        +        //                            return true;
        +        //                        }
        +        //
        +        //                        if (value instanceof ApplicationContext
        +        //                                || value instanceof Context
        +        //                                || value instanceof org.apache.catalina.Context
        +        //                            // SpringBoot 2.6.7 已移除  || value instanceof ch.qos.logback.core.Context
        +        //                        ) {
        +        //                            return false;
        +        //                        }
        +        //
        +        //                        // 防止通过 UnitAuto 远程执行 getDBPassword 等方法来查到敏感信息,但如果直接调用 public String getDBUri 这里没法拦截,仍然会返回敏感信息
        +        //                        //	if (object instanceof SQLConfig) {
        +        //                        //		// 这个类部分方法不序列化返回
        +        //                        //		if ("dBUri".equalsIgnoreCase(name) || "dBPassword".equalsIgnoreCase(name) || "dBAccount".equalsIgnoreCase(name)) {
        +        //                        //			return false;
        +        //                        //		}
        +        //                        //		return false;  // 这个类所有方法都不序列化返回
        +        //                        //	}
        +        //
        +        //                        // 所有类中的方法只要包含关键词就不序列化返回
        +        //                        String n = StringUtil.toLowerCase(name);
        +        //                        if (n.contains("database") || n.contains("schema") || n.contains("dburi") || n.contains("password") || n.contains("account")) {
        +        //                            return false;
        +        //                        }
        +        //
        +        //                        return Modifier.isPublic(value.getClass().getModifiers());
        +        //                    }
        +        //                }));
        +        //            } catch (Exception e) {
        +        //                Log.e(TAG, "toJSONString  catch \n" + e.getMessage());
        +        //            }
        +        //        }
        +        //
        +        //        return jc.parseJSON(type, value);
        +        //    }
        +        //
        +        //};
        +
                 // UnitAuto 单元测试配置  https://github.com/TommyLemon/UnitAuto  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
         
             }
        diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoController.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoController.java
        index 764f707..c84429a 100644
        --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoController.java
        +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoController.java
        @@ -14,13 +14,10 @@
         
         package apijson.boot;
         
        -import apijson.orm.AbstractParser;
        -import apijson.orm.Parser;
        +import apijson.framework.APIJSONParser;
         import apijson.orm.exception.*;
         import com.alibaba.fastjson.JSONArray;
         import com.alibaba.fastjson.JSONObject;
        -import com.alibaba.fastjson.serializer.SerializerFeature;
        -import com.alibaba.fastjson.serializer.ValueFilter;
         import com.fasterxml.jackson.databind.util.LRUMap;
         
         import org.springframework.beans.factory.annotation.Autowired;
        @@ -28,11 +25,9 @@
         import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
         import org.springframework.stereotype.Service;
         import org.springframework.web.bind.annotation.*;
        -import org.springframework.web.client.HttpClientErrorException;
         import org.springframework.web.client.RestClientResponseException;
         import org.springframework.web.client.RestTemplate;
         
        -import java.io.IOException;
         import java.lang.reflect.Array;
         import java.net.URLDecoder;
         import java.net.URLEncoder;
        @@ -64,11 +59,11 @@
         import apijson.demo.model.Verify;
         import apijson.framework.BaseModel;
         import apijson.orm.JSONRequest;
        -import apijson.orm.model.TestRecord;
         import apijson.router.APIJSONRouterController;
        -import org.springframework.web.servlet.ModelAndView;
         import unitauto.MethodUtil;
         
        +import static apijson.JSON.getString;
        +import static apijson.JSON.parseJSON;
         import static apijson.RequestMethod.DELETE;
         import static apijson.RequestMethod.GET;
         import static apijson.RequestMethod.GETS;
        @@ -82,14 +77,13 @@
         import static apijson.framework.APIJSONConstant.FUNCTION_;
         import static apijson.framework.APIJSONConstant.ID;
         import static apijson.framework.APIJSONConstant.REQUEST_;
        -import static apijson.framework.APIJSONConstant.TEST_RECORD_;
         import static apijson.framework.APIJSONConstant.USER_ID;
         import static apijson.framework.APIJSONConstant.VERSION;
         import static org.springframework.http.HttpHeaders.COOKIE;
         import static org.springframework.http.HttpHeaders.SET_COOKIE;
         
         
        -/**请求路由入口控制器,包括通用增删改查接口等,转交给 APIJSON 的 Parser 来处理
        +/**请求路由入口控制器,包括通用增删改查接口等,转交给 APIJSON 的 Parser 来处理
          * 具体见 SpringBoot 文档
          * https://www.springcloud.cc/spring-boot.html#boot-features-spring-mvc
          * 以及 APIJSON 通用文档 3.设计规范 3.1 操作方法
        @@ -103,7 +97,7 @@
         @Service
         @RestController
         @RequestMapping("")
        -public class DemoController extends APIJSONRouterController {  // APIJSONController {
        +public class DemoController extends APIJSONRouterController {  // APIJSONController {
             private static final String TAG = "DemoController";
         
             public String getRequestBaseURL() {
        @@ -137,7 +131,7 @@ public String getRequestURL() {
             }
         
               @Override
        -      public Parser newParser(HttpSession session, RequestMethod method) {
        +      public APIJSONParser newParser(HttpSession session, RequestMethod method) {
                   return super.newParser(session, method).setNeedVerify(false);
               }
         
        @@ -385,7 +379,7 @@ public String openGet(@PathVariable("request") String request, HttpSession sessi
                 try {
                     request = URLDecoder.decode(request, StringUtil.UTF_8);
                 } catch (Exception e) {
        -            // Parser 会报错
        +            // Parser 会报错
                 }
         
                 if (! Log.DEBUG) { // 一般情况这样简单使用
        @@ -397,7 +391,7 @@ public String openGet(@PathVariable("request") String request, HttpSession sessi
                 try {
                     String url = getRequestURL();
         
        -            String query = StringUtil.getTrimedString(httpServletRequest.getQueryString());
        +            String query = StringUtil.trim(httpServletRequest.getQueryString());
                     if (StringUtil.isNotEmpty(query)) {
                         try {
                             query = "?" + URLEncoder.encode(query, StringUtil.UTF_8);
        @@ -543,16 +537,16 @@ public JSONObject reload(@RequestBody String request) {
                     phone = requestObject.getString(PHONE);
                     verify = requestObject.getString(VERIFY);
                 } catch (Exception e) {
        -            return DemoParser.extendErrorResult(requestObject, e);
        +            return new DemoParser().extendErrorResult(requestObject, e);
                 }
         
                 JSONResponse response = new JSONResponse(headVerify(Verify.TYPE_RELOAD, phone, verify));
                 response = response.getJSONResponse(VERIFY_);
                 if (JSONResponse.isExist(response) == false) {
        -            return DemoParser.extendErrorResult(requestObject, new ConditionErrorException("手机号或验证码错误"));
        +            return new DemoParser().extendErrorResult(requestObject, new ConditionErrorException("手机号或验证码错误"));
                 }
         
        -        JSONObject result = DemoParser.newSuccessResult();
        +        JSONObject result = new DemoParser().newSuccessResult();
         
                 boolean reloadAll = StringUtil.isEmpty(type, true) || "ALL".equals(type);
         
        @@ -561,7 +555,7 @@ public JSONObject reload(@RequestBody String request) {
                         result.put(ACCESS_, DemoVerifier.initAccess(false, null, value));
                     } catch (ServerException e) {
                         e.printStackTrace();
        -                result.put(ACCESS_, DemoParser.newErrorResult(e));
        +                result.put(ACCESS_, new DemoParser().newErrorResult(e));
                     }
                 }
         
        @@ -570,7 +564,7 @@ public JSONObject reload(@RequestBody String request) {
                         result.put(FUNCTION_, DemoFunctionParser.init(false, null, value));
                     } catch (ServerException e) {
                         e.printStackTrace();
        -                result.put(FUNCTION_, DemoParser.newErrorResult(e));
        +                result.put(FUNCTION_, new DemoParser().newErrorResult(e));
                     }
                 }
         
        @@ -579,7 +573,7 @@ public JSONObject reload(@RequestBody String request) {
                         result.put(REQUEST_, DemoVerifier.initRequest(false, null, value));
                     } catch (ServerException e) {
                         e.printStackTrace();
        -                result.put(REQUEST_, DemoParser.newErrorResult(e));
        +                result.put(REQUEST_, new DemoParser().newErrorResult(e));
                     }
                 }
         
        @@ -606,7 +600,7 @@ public JSONObject postVerify(@RequestBody String request) {
                     type = requestObject.getIntValue(TYPE);
                     phone = requestObject.getString(PHONE);
                 } catch (Exception e) {
        -            return DemoParser.extendErrorResult(requestObject, e);
        +            return new DemoParser().extendErrorResult(requestObject, e);
                 }
         
                 new DemoParser(DELETE, false).parse(newVerifyRequest(type, phone, null));
        @@ -617,7 +611,7 @@ public JSONObject postVerify(@RequestBody String request) {
         
         
                 if (JSONResponse.isSuccess(response) == false) {
        -            new DemoParser(DELETE, false).parseResponse(new JSONRequest(new Verify(type, phone)));
        +            new DemoParser(DELETE, false).parseResponse((JSONObject) JSON.parseObject(new Verify(type, phone)));
                     return response;
                 }
         
        @@ -648,7 +642,7 @@ public JSONObject getVerify(@RequestBody String request) {
                     type = requestObject.getIntValue(TYPE);
                     phone = requestObject.getString(PHONE);
                 } catch (Exception e) {
        -            return DemoParser.extendErrorResult(requestObject, e);
        +            return new DemoParser().extendErrorResult(requestObject, e);
                 }
                 return new DemoParser(GETS, false).parseResponse(newVerifyRequest(type, phone, null));
             }
        @@ -676,7 +670,7 @@ public JSONObject headVerify(@RequestBody String request) {
                     phone = requestObject.getString(PHONE);
                     verify = requestObject.getString(VERIFY);
                 } catch (Exception e) {
        -            return DemoParser.extendErrorResult(requestObject, e);
        +            return new DemoParser().extendErrorResult(requestObject, e);
                 }
                 return headVerify(type, phone, verify);
             }
        @@ -689,17 +683,17 @@ public JSONObject headVerify(@RequestBody String request) {
              * @return
              */
             public JSONObject headVerify(int type, String phone, String code) {
        -        JSONResponse response = new JSONResponse(
        +        JSONResponse response = new JSONResponse<>(
                         new DemoParser(GETS, false).parseResponse(
        -                        new JSONRequest(
        +                        (JSONObject) JSON.createJSONObject(new JSONRequest(
                                         new Verify(type, phone)
                                                 .setVerify(code)
        -                        ).setTag(VERIFY_)
        +                        ).setTag(VERIFY_))
                         )
                 );
                 Verify verify = response.getObject(Verify.class);
                 if (verify == null) {
        -            return DemoParser.newErrorResult(StringUtil.isEmpty(code, true)
        +            return new DemoParser().newErrorResult(StringUtil.isEmpty(code, true)
                             ? new NotExistException("验证码不存在!") : new ConditionErrorException("手机号或验证码错误!"));
                 }
         
        @@ -708,16 +702,22 @@ public JSONObject headVerify(int type, String phone, String code) {
                 long now = System.currentTimeMillis();
                 if (now > 60*1000 + time) {
                     new DemoParser(DELETE, false).parseResponse(
        -                    new JSONRequest(new Verify(type, phone)).setTag(VERIFY_)
        +                    (JSONObject) JSON.createJSONObject(
        +                            new JSONRequest(
        +                                new JSONRequest(new Verify(type, phone)).setTag(VERIFY_)
        +                            )
        +                    )
                     );
        -            return DemoParser.newErrorResult(new TimeoutException("验证码已过期!"));
        +            return new DemoParser().newErrorResult(new TimeoutException("验证码已过期!"));
                 }
         
        -        return new JSONResponse(
        +        return new JSONResponse(
                         new DemoParser(HEADS, false).parseResponse(
        -                        new JSONRequest(new Verify(type, phone).setVerify(code)).setFormat(true)
        +                        (JSONObject) JSON.createJSONObject(new JSONRequest(
        +                            new JSONRequest(new Verify(type, phone).setVerify(code)).setFormat(true)
        +                        )
                         )
        -        );
        +        )).toObject(JSONObject.class);
             }
         
         
        @@ -727,8 +727,12 @@ public JSONObject headVerify(int type, String phone, String code) {
              * @param verify
              * @return
              */
        -    private apijson.JSONRequest newVerifyRequest(int type, String phone, String verify) {
        -        return new JSONRequest(new Verify(type, phone).setVerify(verify)).setTag(VERIFY_).setFormat(true);
        +    private JSONObject newVerifyRequest(int type, String phone, String verify) {
        +        return JSON.createJSONObject(
        +                new JSONRequest(
        +                        new Verify(type, phone).setVerify(verify)
        +                ).setTag(VERIFY_).setFormat(true)
        +        );
             }
         
         
        @@ -752,7 +756,7 @@ private apijson.JSONRequest newVerifyRequest(int type, String phone, String veri
             }
              * 
        */ - @PostMapping(LOGIN) //TODO 改 SQLConfig 里的 dbAccount, dbPassword,直接用数据库鉴权 + @PostMapping(LOGIN) //TODO 改 SQLConfig 里的 dbAccount, dbPassword,直接用数据库鉴权 public JSONObject login(@RequestBody String request, HttpSession session) { JSONObject requestObject = null; boolean isPassword; @@ -794,31 +798,33 @@ public JSONObject login(@RequestBody String request, HttpSession session) { requestObject.remove(REMEMBER); requestObject.remove(DEFAULTS); } catch (Exception e) { - return DemoParser.extendErrorResult(requestObject, e); + return new DemoParser().extendErrorResult(requestObject, e); } //手机号是否已注册 JSONObject phoneResponse = new DemoParser(HEADS, false).parseResponse( - new JSONRequest( - new Privacy().setPhone(phone) + (JSONObject) JSON.createJSONObject( + new JSONRequest(new Privacy().setPhone(phone)) ) ); if (JSONResponse.isSuccess(phoneResponse) == false) { - return DemoParser.newResult(phoneResponse.getIntValue(JSONResponse.KEY_CODE), phoneResponse.getString(JSONResponse.KEY_MSG)); + return new DemoParser().newResult(phoneResponse.getIntValue(JSONResponse.KEY_CODE), getString(phoneResponse, JSONResponse.KEY_MSG)); } - JSONResponse response = new JSONResponse(phoneResponse).getJSONResponse(PRIVACY_); + JSONResponse response = new JSONResponse(phoneResponse).getJSONResponse(PRIVACY_); if(JSONResponse.isExist(response) == false) { - return DemoParser.newErrorResult(new NotExistException("手机号未注册")); + return new DemoParser().newErrorResult(new NotExistException("手机号未注册")); } //根据phone获取User JSONObject privacyResponse = new DemoParser(GETS, false).parseResponse( - new JSONRequest( - new Privacy().setPhone(phone) - ).setFormat(true) + (JSONObject) JSON.createJSONObject( + new JSONRequest( + new Privacy().setPhone(phone) + ).setFormat(true) + ) ); - response = new JSONResponse(privacyResponse); + response = new JSONResponse<>(privacyResponse); Privacy privacy = response == null ? null : response.getObject(Privacy.class); long userId = privacy == null ? 0 : BaseModel.value(privacy.getId()); @@ -828,35 +834,39 @@ public JSONObject login(@RequestBody String request, HttpSession session) { //校验凭证 if (isPassword) { //password 密码登录 - response = new JSONResponse( + response = new JSONResponse<>( new DemoParser(HEADS, false).parseResponse( - new JSONRequest(new Privacy(userId).setPassword(password)) + (JSONObject) JSON.createJSONObject( + new JSONRequest(new Privacy(userId).setPassword(password)) + ) ) ); } else {//verify手机验证码登录 - response = new JSONResponse(headVerify(Verify.TYPE_LOGIN, phone, password)); + response = new JSONResponse<>(headVerify(Verify.TYPE_LOGIN, phone, password)); } if (JSONResponse.isSuccess(response) == false) { - return response; + return response.toObject(JSONObject.class); } response = response.getJSONResponse(isPassword ? PRIVACY_ : VERIFY_); if (JSONResponse.isExist(response) == false) { - return DemoParser.newErrorResult(new ConditionErrorException("账号或密码错误")); + return new DemoParser().newErrorResult(new ConditionErrorException("账号或密码错误")); } - response = new JSONResponse( + response = new JSONResponse<>( new DemoParser(GETS, false).parseResponse( - new JSONRequest( // 兼容 MySQL 5.6 及以下等不支持 json 类型的数据库 - USER_, // User 里在 setContactIdList(List) 后加 setContactIdList(String) 没用 - new apijson.JSONObject( // fastjson 查到一个就不继续了,所以只能加到前面或者只有这一个,但这样反过来不兼容 5.7+ - new User(userId) // 所以就用 @json 来强制转为 JSONArray,保证有效 - ).setJson("contactIdList,pictureList") - ).setFormat(true) + (JSONObject) JSON.createJSONObject( + new JSONRequest( // 兼容 MySQL 5.6 及以下等不支持 json 类型的数据库 + USER_, // User 里在 setContactIdList(List) 后加 setContactIdList(String) 没用 + new apijson.JSONObject( // fastjson 查到一个就不继续了,所以只能加到前面或者只有这一个,但这样反过来不兼容 5.7+ + new User(userId) // 所以就用 @json 来强制转为 JSONArray,保证有效 + ).setJson("contactIdList,pictureList") + ).setFormat(true) + ) ) ); User user = response.getObject(User.class); if (user == null || BaseModel.value(user.getId()) != userId) { - return DemoParser.newErrorResult(new NullPointerException("服务器内部错误")); + return new DemoParser().newErrorResult(new NullPointerException("服务器内部错误")); } //登录状态保存至session @@ -871,7 +881,7 @@ public JSONObject login(@RequestBody String request, HttpSession session) { response.put(REMEMBER, remember); response.put(DEFAULTS, defaults); - return response; + return JSON.createJSONObject(response); } /**退出登录,清空session @@ -889,11 +899,11 @@ public JSONObject logout(HttpSession session) { Log.d(TAG, "logout userId = " + userId + "; session.getId() = " + (session == null ? null : session.getId())); super.logout(session); } catch (Exception e) { - return DemoParser.newErrorResult(e); + return new DemoParser().newErrorResult(e); } - JSONObject result = DemoParser.newSuccessResult(); - JSONObject user = DemoParser.newSuccessResult(); + JSONObject result = new DemoParser().newSuccessResult(); + JSONObject user = new DemoParser().newSuccessResult(); user.put(ID, userId); user.put(COUNT, 1); result.put(StringUtil.firstCase(USER_), user); @@ -933,7 +943,7 @@ public JSONObject register(@RequestBody String request) { requestObject = DemoParser.parseRequest(request); privacyObj = requestObject.getJSONObject(PRIVACY_); - phone = StringUtil.getString(privacyObj.getString(PHONE)); + phone = StringUtil.get(privacyObj.getString(PHONE)); verify = requestObject.getString(VERIFY); password = privacyObj.getString(_PASSWORD); @@ -947,17 +957,17 @@ public JSONObject register(@RequestBody String request) { return newIllegalArgumentResult(requestObject, VERIFY); } } catch (Exception e) { - return DemoParser.extendErrorResult(requestObject, e); + return new DemoParser().extendErrorResult(requestObject, e); } - JSONResponse response = new JSONResponse(headVerify(Verify.TYPE_REGISTER, phone, verify)); + JSONResponse response = new JSONResponse<>(headVerify(Verify.TYPE_REGISTER, phone, verify)); if (JSONResponse.isSuccess(response) == false) { - return response; + return JSON.createJSONObject(response); } //手机号或验证码错误 if (JSONResponse.isExist(response.getJSONResponse(VERIFY_)) == false) { - return DemoParser.extendErrorResult(response, new ConditionErrorException("手机号或验证码错误!")); + return new DemoParser().extendErrorResult(JSON.createJSONObject(response), new ConditionErrorException("手机号或验证码错误!")); } @@ -983,14 +993,14 @@ public JSONObject register(@RequestBody String request) { if (e != null) { //出现错误,回退 new DemoParser(DELETE, false).parseResponse( - new JSONRequest(new User(userId)) + (JSONObject) apijson.JSON.parseObject(new User(userId)) ); new DemoParser(DELETE, false).parseResponse( - new JSONRequest(new Privacy(userId2)) + (JSONObject) apijson.JSON.parseObject(new Privacy(userId2)) ); } - return response; + return JSON.createJSONObject(response); } @@ -1009,8 +1019,8 @@ public static JSONObject newIllegalArgumentResult(JSONObject requestObject, Stri * @return */ public static JSONObject newIllegalArgumentResult(JSONObject requestObject, String key, String msg) { - return DemoParser.extendErrorResult(requestObject - , new IllegalArgumentException(key + ":value 中value不合法!" + StringUtil.getString(msg))); + return new DemoParser().extendErrorResult(requestObject + , new IllegalArgumentException(key + ":value 中value不合法!" + StringUtil.get(msg))); } @@ -1051,8 +1061,8 @@ public JSONObject putPassword(@RequestBody String request){ String password; try { requestObject = DemoParser.parseRequest(request); - oldPassword = StringUtil.getString(requestObject.getString(OLD_PASSWORD)); - verify = StringUtil.getString(requestObject.getString(VERIFY)); + oldPassword = StringUtil.get(requestObject.getString(OLD_PASSWORD)); + verify = StringUtil.get(requestObject.getString(VERIFY)); requestObject.remove(OLD_PASSWORD); requestObject.remove(VERIFY); @@ -1077,16 +1087,16 @@ public JSONObject putPassword(@RequestBody String request){ } } } catch (Exception e) { - return DemoParser.extendErrorResult(requestObject, e); + return new DemoParser().extendErrorResult(requestObject, e); } if (StringUtil.isPassword(oldPassword)) { if (userId <= 0) { //手机号+验证码不需要userId - return DemoParser.extendErrorResult(requestObject, new IllegalArgumentException(ID + ":value 中value不合法!")); + return new DemoParser().extendErrorResult(requestObject, new IllegalArgumentException(ID + ":value 中value不合法!")); } if (oldPassword.equals(password)) { - return DemoParser.extendErrorResult(requestObject, new ConflictException("新旧密码不能一样!")); + return new DemoParser().extendErrorResult(requestObject, new ConflictException("新旧密码不能一样!")); } //验证旧密码 @@ -1098,24 +1108,24 @@ public JSONObject putPassword(@RequestBody String request){ } JSONResponse response = new JSONResponse( new DemoParser(HEAD, false).parseResponse( - new JSONRequest(privacy).setFormat(true) + (JSONObject) JSON.createJSONObject(new JSONRequest(privacy).setFormat(true)) ) ); if (JSONResponse.isExist(response.getJSONResponse(PRIVACY_)) == false) { - return DemoParser.extendErrorResult(requestObject, new ConditionErrorException("账号或原密码错误,请重新输入!")); + return new DemoParser().extendErrorResult(requestObject, new ConditionErrorException("账号或原密码错误,请重新输入!")); } } else if (StringUtil.isPhone(phone) && StringUtil.isVerify(verify)) { - JSONResponse response = new JSONResponse(headVerify(type, phone, verify)); + JSONResponse response = new JSONResponse(headVerify(type, phone, verify)); if (JSONResponse.isSuccess(response) == false) { - return response; + return JSON.createJSONObject(response); } if (JSONResponse.isExist(response.getJSONResponse(VERIFY_)) == false) { - return DemoParser.extendErrorResult(response, new ConditionErrorException("手机号或验证码错误!")); + return new DemoParser().extendErrorResult(JSON.createJSONObject(response), new ConditionErrorException("手机号或验证码错误!")); } - response = new JSONResponse( + response = new JSONResponse<>( new DemoParser(GET, false).parseResponse( - new JSONRequest( + (JSONObject) JSON.parseObject( new Privacy().setPhone(phone) ) ) @@ -1127,7 +1137,7 @@ else if (StringUtil.isPhone(phone) && StringUtil.isVerify(verify)) { requestObject.put(PRIVACY_, privacyObj); } else { - return DemoParser.extendErrorResult(requestObject, new IllegalArgumentException("请输入合法的 旧密码 或 手机号+验证码 !")); + return new DemoParser().extendErrorResult(requestObject, new IllegalArgumentException("请输入合法的 旧密码 或 手机号+验证码 !")); } //TODO 上线版加上 password = MD5Util.MD5(password); @@ -1181,20 +1191,20 @@ public JSONObject putBalance(@RequestBody String request, HttpSession session) { throw new IllegalArgumentException(PRIVACY_ + "." + _PAY_PASSWORD + ":value 中value不合法!"); } } catch (Exception e) { - return DemoParser.extendErrorResult(requestObject, e); + return new DemoParser().extendErrorResult(requestObject, e); } //验证密码<<<<<<<<<<<<<<<<<<<<<<< privacyObj.remove("balance+"); - JSONResponse response = new JSONResponse( + JSONResponse response = new JSONResponse<>( new DemoParser(HEADS, false).setSession(session).parseResponse( - new JSONRequest(PRIVACY_, privacyObj) + (JSONObject) JSON.createJSONObject(PRIVACY_, privacyObj) ) ); response = response.getJSONResponse(PRIVACY_); if (JSONResponse.isExist(response) == false) { - return DemoParser.extendErrorResult(requestObject, new ConditionErrorException("支付密码错误!")); + return new DemoParser().extendErrorResult(requestObject, new ConditionErrorException("支付密码错误!")); } //验证密码>>>>>>>>>>>>>>>>>>>>>>>> @@ -1203,30 +1213,30 @@ public JSONObject putBalance(@RequestBody String request, HttpSession session) { //验证金额范围<<<<<<<<<<<<<<<<<<<<<<< if (change == 0) { - return DemoParser.extendErrorResult(requestObject, new OutOfRangeException("balance+的值不能为0!")); + return new DemoParser().extendErrorResult(requestObject, new OutOfRangeException("balance+的值不能为0!")); } if (Math.abs(change) > 10000) { - return DemoParser.extendErrorResult(requestObject, new OutOfRangeException("单次 充值/提现 的金额不能超过10000元!")); + return new DemoParser().extendErrorResult(requestObject, new OutOfRangeException("单次 充值/提现 的金额不能超过10000元!")); } //验证金额范围>>>>>>>>>>>>>>>>>>>>>>>> if (change < 0) {//提现 - response = new JSONResponse( + response = new JSONResponse<>( new DemoParser(GETS, false).parseResponse( - new JSONRequest( + (JSONObject) JSON.parseObject( new Privacy(userId) ) ) ); - Privacy privacy = response == null ? null : response.getObject(Privacy.class); + Privacy privacy = response.getObject(Privacy.class); long id = privacy == null ? 0 : BaseModel.value(privacy.getId()); if (id != userId) { - return DemoParser.extendErrorResult(requestObject, new Exception("服务器内部错误!")); + return new DemoParser().extendErrorResult(requestObject, new Exception("服务器内部错误!")); } if (BaseModel.value(privacy.getBalance()) < -change) { - return DemoParser.extendErrorResult(requestObject, new OutOfRangeException("余额不足!")); + return new DemoParser().extendErrorResult(requestObject, new OutOfRangeException("余额不足!")); } } @@ -1304,7 +1314,7 @@ public String delegate( HttpMethod method, HttpSession session ) { if (Log.DEBUG == false) { - return DemoParser.newErrorResult(new IllegalAccessException("非 DEBUG 模式下不允许使用服务器代理!")).toJSONString(); + return new DemoParser().newErrorResult(new IllegalAccessException("非 DEBUG 模式下不允许使用服务器代理!")).toJSONString(); } int recordType = record != null ? record : (REQUEST_RECORD_TYPE != null ? REQUEST_RECORD_TYPE : 0); @@ -1424,10 +1434,10 @@ else if (body != null && "DATA".equals(type)) { // if (StringUtil.isNotEmpty(bod hm.put(name, h); try { - com.alibaba.fastjson.JSON.parse(h); + JSON.parseJSON(h); } catch (Throwable e) { Log.e(TAG, "delegate try {\n" + - " JSON.parse(h);\n" + + " parseJSON(h);\n" + " } catch (Throwable e) = " + e.getMessage()); hs += "\n" + name + ": " + "\"" + h.replaceAll("\"", "\\\"") + "\""; continue; @@ -1466,11 +1476,11 @@ else if (names != null) { hm.put(name, h); try { - com.alibaba.fastjson.JSON.parse(h); + parseJSON(h); } catch (Throwable e) { Log.e(TAG, "delegate try {\n" + - " JSON.parse(h);\n" + + " parseJSON(h);\n" + " } catch (Throwable e) = " + e.getMessage()); hs += "\n" + name + ": " + "\"" + h.replaceAll("\"", "\\\"") + "\""; continue; @@ -1537,7 +1547,7 @@ else if (names != null) { for (Entry e : set) { if (e != null) { String[] vals = e.getValue(); - url += ((first ? "" : "&") + e.getKey() + "=" + ( vals == null || vals.length <= 0 ? "" : StringUtil.getString(vals[0]) )); + url += ((first ? "" : "&") + e.getKey() + "=" + ( vals == null || vals.length <= 0 ? "" : StringUtil.get(vals[0]) )); first = false; } } @@ -1572,7 +1582,7 @@ else if (names != null) { : (MediaType.MULTIPART_FORM_DATA.equals(contentType) ? "DATA" : "JSON"))) // FIXME 考虑 XML, PNG 等格式? ) : "JSON"; - String sql = isSQL ? StringUtil.getTrimedString(req.getString("sql")) : null; + String sql = isSQL ? StringUtil.trim(req.getString("sql")) : null; String newSql = ""; // String[] lines = sql.split(" \\? "); // StringUtil.split(sql, " \\? ", false); // int len = lines == null ? 0 : lines.length; @@ -1637,7 +1647,7 @@ else if (names != null) { sql = newSql.trim(); } - JSONRequest existReq = new JSONRequest(); + JSONObject existReq = new JSONObject(true); if (isUnit) { if (req != null) { // Method <<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -1656,7 +1666,7 @@ else if (names != null) { mthd.put(MethodUtil.KEY_METHOD, req.getString(MethodUtil.KEY_METHOD)); mthd.put(MethodUtil.KEY_METHOD_ARGS, req.getString(MethodUtil.KEY_METHOD_ARGS)); // mthd.put("header", StringUtil.isEmpty(hs, true) ? null : hs.trim()); - existReq.put("Method", mthd); + existReq.put("Method", JSON.createJSONObject(mthd)); // Method >>>>>>>>>>>>>>>>>>>>>>>>>>>>> } } @@ -1673,12 +1683,12 @@ else if (names != null) { if (isSQL) { document.put("sqlauto", sql); } - existReq.put("Document", document); + existReq.put("Document", JSON.createJSONObject(document)); // Document >>>>>>>>>>>>>>>>>>>>>>>>>>>>> } JSONObject existRsp = newParser(session, GET).parseResponse(existReq); - JSONResponse existRsp2 = new JSONResponse(existRsp).getJSONResponse("Document"); + JSONResponse existRsp2 = new JSONResponse(existRsp).getJSONResponse("Document"); long documentId = existRsp2 == null ? 0 : existRsp2.getId(); JSONRequest request = new JSONRequest(); @@ -1703,7 +1713,7 @@ else if (names != null) { mthd.put(MethodUtil.KEY_METHOD_ARGS, req.getString(MethodUtil.KEY_METHOD_ARGS)); mthd.put("genericMethodArgs", req.getString(MethodUtil.KEY_METHOD_ARGS)); mthd.put("request", body); - request.put("Method", mthd); + request.put("Method", JSON.createJSONObject(mthd)); // Method >>>>>>>>>>>>>>>>>>>>>>>>>>>>> } else if (recordType > 0) { @@ -1730,7 +1740,7 @@ else if (recordType > 0) { document.put("sqlauto", sql); } // document.put("detail", ""); - request.put("Document", document); + request.put("Document", JSON.createJSONObject(document)); // Document >>>>>>>>>>>>>>>>>>>>>>>>>>>>> } else { @@ -1752,7 +1762,7 @@ else if (recordType > 0) { random.put("from", 2); // 0-测试工具,1-CI/CD,2-流量录制 random.put("name", "[Record] " + new java.util.Date().toLocaleString()); - request.put("Random", random); + request.put("Random", JSON.createJSONObject(random)); request.setTag("Random"); } else { // testRecord.setColumn("id,response,header"); @@ -1765,11 +1775,11 @@ else if (recordType > 0) { } else { try { - Object reqObj = JSON.parse(reqStr); + Object reqObj = parseJSON(reqStr); isDefault = Objects.equals(reqObj, req); } catch (Throwable e) { - Log.w(TAG, "delegate try { Object reqObj = JSON.parse(reqStr); ..." + + Log.w(TAG, "delegate try { Object reqObj = parseJSON(reqStr); ..." + " } catch (Throwable e) = " + e.getMessage()); } } @@ -1780,7 +1790,7 @@ else if (recordType > 0) { else { long randomId = 0; try { - apijson.JSONRequest randomReq = new apijson.JSONRequest(); + JSONObject randomReq = new JSONObject(true); randomReq.put("Random", random); JSONObject rsp = newParser(session, GET).parseResponse(randomReq); @@ -1810,14 +1820,16 @@ else if (recordType > 0) { testRecord.put("response", rspBody); // 用 JSONRequest.put 会转为 JSONObject } // TestRecord >>>>>>>>>>>>>>>>>>>>>>>>>>>>> - request.put("TestRecord", testRecord); - JSONObject rsp = newParser(session, recordType < 0 ? GET : POST).parseResponse(request); + request.put("TestRecord", JSON.createJSONObject(testRecord)); + JSONObject rsp = newParser(session, recordType < 0 ? GET : POST).parseResponse( + (JSONObject) JSON.createJSONObject(request) + ); if (recordType < 0) { JSONObject rsp2 = rsp == null ? null : rsp.getJSONObject("TestRecord"); String response = rsp2 == null ? null : rsp2.getString("response"); if (StringUtil.isNotEmpty(response, true)) { String header = rsp2.getString("header"); - String[] lines = StringUtil.split(StringUtil.getTrimedString(header), "\n"); + String[] lines = StringUtil.split(StringUtil.trim(header), "\n"); if (lines != null) { for (String line : lines) { @@ -2000,7 +2012,7 @@ private String parseRandomConfig(String path, Object obj) { public String execute(@RequestBody String request, HttpSession session) { try { if (Log.DEBUG == false) { - return DemoParser.newErrorResult(new IllegalAccessException("非 DEBUG 模式下不允许调用 /sql/execute !")).toJSONString(); + return new DemoParser().newErrorResult(new IllegalAccessException("非 DEBUG 模式下不允许调用 /sql/execute !")).toJSONString(); } // DemoVerifier.verifyLogin(session); @@ -2160,7 +2172,7 @@ public String execute(@RequestBody String request, HttpSession session) { // } } - JSONObject result = DemoParser.newSuccessResult(); + JSONObject result = new DemoParser().newSuccessResult(); result.put("sql", sql); result.put("args", arg); if (isWrite) { @@ -2178,7 +2190,7 @@ public String execute(@RequestBody String request, HttpSession session) { return result.toJSONString(); } catch (Exception e) { - JSONObject result = DemoParser.newErrorResult(e); + JSONObject result = new DemoParser().newErrorResult(e); result.put("throw", e.getClass().getName()); result.put("trace:stack", e.getStackTrace()); @@ -2189,7 +2201,7 @@ public String execute(@RequestBody String request, HttpSession session) { return result.toJSONString(); } } catch (Exception e) { - JSONObject result = DemoParser.newErrorResult(e); + JSONObject result = new DemoParser().newErrorResult(e); result.put("throw", e.getClass().getName()); result.put("trace:stack", e.getStackTrace()); return result.toJSONString(); @@ -2664,15 +2676,15 @@ public String ui() { // 为 UnitAuto 提供的单元测试接口 https://github.com/TommyLemon/UnitAuto <<<<<<<<<<<<<<<<<<<<<<<<<<< - @PostMapping("method/list") - public JSONObject listMethod(@RequestBody String request) { - return super.listMethod(request); - } - - @PostMapping("method/invoke") - public void invokeMethod(@RequestBody String request, HttpServletRequest servletRequest) { - super.invokeMethod(request, servletRequest); - } + //@PostMapping("method/list") + //public JSONObject listMethod(@RequestBody String request) { + // return super.listMethod(request); + //} + // + //@PostMapping("method/invoke") + //public void invokeMethod(@RequestBody String request, HttpServletRequest servletRequest) { + // super.invokeMethod(request, servletRequest); + //} // 为 UnitAuto 提供的单元测试接口 https://github.com/TommyLemon/UnitAuto >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/FileController.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/FileController.java index 7687633..6635bb5 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/FileController.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/FileController.java @@ -78,7 +78,7 @@ public void initFileRepository(){ public JSONObject files() { JSONObject res = new JSONObject(); res.put("data", fileRepository); - return DemoParser.extendSuccessResult(res); + return new DemoParser().extendSuccessResult(res); } @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) @@ -96,11 +96,11 @@ public JSONObject upload(@RequestParam("file") MultipartFile file) { JSONObject res = new JSONObject(); res.put("path", file.getOriginalFilename()); res.put("size", file.getBytes().length); - return DemoParser.extendSuccessResult(res); + return new DemoParser().extendSuccessResult(res); } catch (Exception e) { e.printStackTrace(); - return DemoParser.newErrorResult(e); + return new DemoParser().newErrorResult(e); } } diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoFunctionParser.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoFunctionParser.java index 0f58395..91aebb0 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoFunctionParser.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoFunctionParser.java @@ -37,7 +37,7 @@ * 具体见 https://github.com/Tencent/APIJSON/issues/101 * @author Lemon */ -public class DemoFunctionParser extends APIJSONFunctionParser { +public class DemoFunctionParser extends APIJSONFunctionParser { public static final String TAG = "DemoFunctionParser"; static { @@ -148,10 +148,10 @@ public int deleteCommentOfMoment(@NotNull JSONObject curObj, @NotNull String mom return 0; } - JSONRequest request = new JSONRequest(); + JSONObject request = new JSONObject(true); //Comment<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - JSONRequest comment = new JSONRequest(); + JSONObject comment = new JSONObject(true); comment.put("momentId", mid); request.put("Comment", comment); @@ -177,10 +177,10 @@ public int deleteChildComment(@NotNull JSONObject curObj, @NotNull String toId) //递归获取到全部子评论id - JSONRequest request = new JSONRequest(); + JSONObject request = new JSONObject(true); //Comment<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - JSONRequest comment = new JSONRequest(); + JSONObject comment = new JSONObject(); comment.put("id{}", getChildCommentIdList(tid)); request.put("Comment", comment); @@ -196,7 +196,7 @@ public int deleteChildComment(@NotNull JSONObject curObj, @NotNull String toId) private JSONArray getChildCommentIdList(long tid) { JSONArray arr = new JSONArray(); - JSONRequest request = new JSONRequest(); + JSONObject request = apijson.JSON.createJSONObject(); //Comment-id[]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< JSONRequest idItem = new JSONRequest(); @@ -205,10 +205,10 @@ private JSONArray getChildCommentIdList(long tid) { JSONRequest comment = new JSONRequest(); comment.put("toId", tid); comment.setColumn("id"); - idItem.put("Comment", comment); + idItem.put("Comment", apijson.JSON.createJSONObject(comment)); //Comment>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - request.putAll(idItem.toArray(0, 0, "Comment-id")); + request.putAll(apijson.JSON.createJSONObject(idItem.toArray(0, 0, "Comment-id"))); //Comment-id[]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> JSONObject rp = new DemoParser().setNeedVerify(false).parseResponse(request); diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoObjectParser.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoObjectParser.java index b4ef70f..bb79833 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoObjectParser.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoObjectParser.java @@ -14,6 +14,7 @@ package apijson.demo; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import java.util.List; @@ -30,15 +31,17 @@ /**对象解析器,用来简化 Parser * @author Lemon */ -public class DemoObjectParser extends APIJSONObjectParser { +public class DemoObjectParser extends APIJSONObjectParser { - public DemoObjectParser(HttpSession session, @NotNull JSONObject request, String parentPath, SQLConfig arrayConfig + public DemoObjectParser(HttpSession session, @NotNull JSONObject request, String parentPath + , SQLConfig arrayConfig , boolean isSubquery, boolean isTable, boolean isArrayMainTable) throws Exception { super(session, request, parentPath, arrayConfig, isSubquery, isTable, isArrayMainTable); } @Override - public SQLConfig newSQLConfig(RequestMethod method, String table, String alias, JSONObject request, List joinList, boolean isProcedure) throws Exception { + public SQLConfig newSQLConfig(RequestMethod method, String table, String alias + , JSONObject request, List> joinList, boolean isProcedure) throws Exception { return DemoSQLConfig.newSQLConfig(method, table, alias, request, joinList, isProcedure); } diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoParser.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoParser.java index c0a3e34..4a9fd8a 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoParser.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoParser.java @@ -14,6 +14,9 @@ package apijson.demo; +import apijson.JSONResponse; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import java.util.HashMap; @@ -36,7 +39,7 @@ * 具体见 https://github.com/Tencent/APIJSON/issues/38 * @author Lemon */ -public class DemoParser extends APIJSONParser { +public class DemoParser extends APIJSONParser { public static final Map KEY_MAP; static { @@ -53,34 +56,47 @@ public DemoParser(RequestMethod method, boolean needVerify) { super(method, needVerify); } -// // 可重写来设置分页页码是否从 1 开始,true - 从 1 开始;false - 从 0 开始 + public static JSONObject parseRequest(String request) { + try { + return JSON.parseObject(request); + } catch (Exception e) { + return new DemoParser().newResult(JSONResponse.CODE_ILLEGAL_ARGUMENT, "JSON 格式不合法!" + request); + } + } + + @Override + public DemoParser setNeedVerify(boolean needVerify) { + super.setNeedVerify(needVerify); + return this; + } + + // // 可重写来设置分页页码是否从 1 开始,true - 从 1 开始;false - 从 0 开始 // @Override // public boolean isStartFrom1() { // return true; // } private int maxQueryCount = 2000; -// // 可重写来设置最大查询数量 -// @Override -// public int getMaxQueryCount() { -// return maxQueryCount; -// } -// -// @Override -// public int getMaxUpdateCount() { -// return 2000; -// } -// -// @Override -// public int getMaxObjectCount() { -// return getMaxUpdateCount(); -// } -// -// @Override -// public int getMaxSQLCount() { -// return getMaxUpdateCount(); -// } + // 可重写来设置最大查询数量 + @Override + public int getMaxQueryCount() { + return maxQueryCount; + } + + @Override + public int getMaxUpdateCount() { + return 2000; + } + @Override + public int getMaxObjectCount() { + return getMaxUpdateCount(); + } + + @Override + public int getMaxSQLCount() { + return getMaxUpdateCount(); + } @Override public JSONObject parseResponse(JSONObject request) { @@ -96,8 +112,10 @@ public JSONObject parseResponse(JSONObject request) { return super.parseResponse(request); } + @Override - public APIJSONObjectParser createObjectParser(JSONObject request, String parentPath, SQLConfig arrayConfig + public APIJSONObjectParser createObjectParser(JSONObject request, String parentPath + , SQLConfig arrayConfig , boolean isSubquery, boolean isTable, boolean isArrayMainTable) throws Exception { return new DemoObjectParser(getSession(), request, parentPath, arrayConfig , isSubquery, isTable, isArrayMainTable).setMethod(getMethod()).setParser(this); @@ -108,7 +126,7 @@ public APIJSONObjectParser createObjectParser(JSONObject request, String p private String dbAccount; private String dbPassword; @Override - public APIJSONParser setSession(HttpSession session) { + public APIJSONParser setSession(HttpSession session) { Boolean asDBAccount = (Boolean) session.getAttribute(DemoController.AS_DB_ACCOUNT); this.asDBAccount = asDBAccount != null && asDBAccount; if (this.asDBAccount) { @@ -123,13 +141,13 @@ public APIJSONParser setSession(HttpSession session) { } @Override - public JSONObject executeSQL(SQLConfig config, boolean isSubquery) throws Exception { + public JSONObject executeSQL(SQLConfig config, boolean isSubquery) throws Exception { if (asDBAccount && config instanceof DemoSQLConfig) { DemoSQLConfig cfg = (DemoSQLConfig) config; - if (StringUtil.isEmpty(cfg.getDBAccount())) { + if (StringUtil.isEmpty(cfg.gainDBAccount())) { cfg.setDBAccount(dbAccount); } - if (StringUtil.isEmpty(cfg.getDBPassword())) { + if (StringUtil.isEmpty(cfg.gainDBPassword())) { cfg.setDBPassword(dbPassword); } } diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java index ca7d71c..ca733d1 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java @@ -22,16 +22,19 @@ import java.text.SimpleDateFormat; import java.util.*; -import apijson.*; //import apijson.influxdb.InfluxDBUtil; //import apijson.iotdb.IoTDBUtil; +import apijson.RequestMethod; +import apijson.StringUtil; import apijson.orm.AbstractParser; import apijson.orm.AbstractSQLConfig; import apijson.orm.Parser; //import apijson.surrealdb.SurrealDBUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.annotation.JSONField; -import apijson.column.ColumnUtil; +import apijson.framework.ColumnUtil; import apijson.framework.APIJSONSQLConfig; import apijson.orm.Join; import apijson.orm.Join.On; @@ -44,7 +47,7 @@ * https://github.com/Tencent/APIJSON/blob/master/%E8%AF%A6%E7%BB%86%E7%9A%84%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3.md#c-1-1%E4%BF%AE%E6%94%B9%E6%95%B0%E6%8D%AE%E5%BA%93%E9%93%BE%E6%8E%A5 * @author Lemon */ -public class DemoSQLConfig extends APIJSONSQLConfig { +public class DemoSQLConfig extends APIJSONSQLConfig { public DemoSQLConfig() { super(); @@ -70,10 +73,10 @@ public DemoSQLConfig(RequestMethod method, String table) { // TABLE_KEY_MAP.put(Privacy.class.getSimpleName(), "apijson_privacy"); // 主键名映射 - SIMPLE_CALLBACK = new SimpleCallback() { + SIMPLE_CALLBACK = new SimpleCallback() { @Override - public AbstractSQLConfig getSQLConfig(RequestMethod method, String database, String schema, String datasource, String table) { + public AbstractSQLConfig getSQLConfig(RequestMethod method, String database, String schema, String datasource, String table) { return new DemoSQLConfig(method, table); } @@ -147,7 +150,7 @@ public String getUserIdKey(String database, String schema, String datasource, St // 如果 DemoSQLExecutor.getConnection 能拿到连接池的有效 Connection,则这里不需要配置 dbVersion, dbUri, dbAccount, dbPassword @Override - public String getDBVersion() { + public String gainDBVersion() { if (isMySQL()) { // return "5.7.22"; // return "8.0.11"; //TODO 改成你自己的 MySQL 或 PostgreSQL 数据库版本号 //MYSQL 8 和 7 使用的 JDBC 配置不一样 @@ -203,9 +206,8 @@ public DemoSQLConfig setDBUri(String dbUri) { this.dbUri = dbUri; return this; } - @JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息,用了 UnitAuto 则一定要加 @Override - public String getDBUri() { + public String gainDBUri() { if (StringUtil.isNotEmpty(dbUri)) { return dbUri; } @@ -219,10 +221,10 @@ public String getDBUri() { if (isPostgreSQL()) { // PG JDBC 必须在 URI 传 catalog return "jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"; //TODO 改成你自己的 } - // if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog - // return "jdbc:postgresql://localhost:26257/movr?sslmode=require"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach && cockroach demo - // // return "jdbc:postgresql://localhost:26258/postgres?sslmode=disable"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach # && start 3 nodes and init cluster - // } + //if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog + // return "jdbc:postgresql://localhost:26257/movr?sslmode=require"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach && cockroach demo + // // return "jdbc:postgresql://localhost:26258/postgres?sslmode=disable"; //TODO 改成你自己的 brew install cockroachdb/tap/cockroach # && start 3 nodes and init cluster + //} if (isSQLServer()) { return "jdbc:jtds:sqlserver://localhost:1433/pubs;instance=SQLEXPRESS"; //TODO 改成你自己的 } @@ -242,41 +244,41 @@ public String getDBUri() { // return "jdbc:TAOS://localhost:6030"; //TODO 改成你自己的 return "jdbc:TAOS-RS://localhost:6041"; //TODO 改成你自己的 } - // if (isTimescaleDB()) { // PG JDBC 必须在 URI 传 catalog - // return "jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"; //TODO 改成你自己的 - // } - // if (isQuestDB()) { // PG JDBC 必须在 URI 传 catalog - // return "jdbc:postgresql://localhost:8812/qdb"; //TODO 改成你自己的 - // } + if (isTimescaleDB()) { // PG JDBC 必须在 URI 传 catalog + return "jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"; //TODO 改成你自己的 + } + if (isQuestDB()) { // PG JDBC 必须在 URI 传 catalog + return "jdbc:postgresql://localhost:8812/qdb"; //TODO 改成你自己的 + } if (isInfluxDB()) { return "http://203.189.6.3:8086"; //TODO 改成你自己的 } if (isMilvus()) { return "http://localhost:19530"; //TODO 改成你自己的 } - // if (isManticore()) { - // return "jdbc:mysql://localhost:9306?characterEncoding=utf8&maxAllowedPacket=512000"; //TODO 改成你自己的 - // } - // if (isIoTDB()) { - // return "jdbc:iotdb://localhost:6667"; // ?charset=GB18030 加参数会报错 URI 格式错误 //TODO 改成你自己的 - // } + //if (isManticore()) { + // return "jdbc:mysql://localhost:9306?characterEncoding=utf8&maxAllowedPacket=512000"; //TODO 改成你自己的 + //} + //if (isIoTDB()) { + // return "jdbc:iotdb://localhost:6667"; // ?charset=GB18030 加参数会报错 URI 格式错误 //TODO 改成你自己的 + //} if (isMongoDB()) { return "jdbc:mongodb://atlas-sql-6593c65c296c5865121e6ebe-xxskv.a.query.mongodb.net/myVirtualDatabase?ssl=true&authSource=admin"; //TODO 改成你自己的 } if (isCassandra()) { return "http://localhost:7001"; //TODO 改成你自己的 } - // if (isDuckDB()) { - // return "jdbc:duckdb:/Users/tommylemon/my_database.duckdb"; //TODO 改成你自己的 - // } - // if (isSurrealDB()) { - // // return "memory"; //TODO 改成你自己的 - // // return "surrealkv://localhost:8000"; //TODO 改成你自己的 - // return "ws://localhost:8000"; //TODO 改成你自己的 - // } - // if (isOpenGauss()) { - // return "jdbc:opengauss://127.0.0.1:5432/postgres?currentSchema=" + DEFAULT_SCHEMA; //TODO 改成你自己的 - // } + //if (isDuckDB()) { + // return "jdbc:duckdb:/Users/tommylemon/my_database.duckdb"; //TODO 改成你自己的 + //} + //if (isSurrealDB()) { + // // return "memory"; //TODO 改成你自己的 + // // return "surrealkv://localhost:8000"; //TODO 改成你自己的 + // return "ws://localhost:8000"; //TODO 改成你自己的 + //} + //if (isOpenGauss()) { + // return "jdbc:opengauss://127.0.0.1:5432/postgres?currentSchema=" + DEFAULT_SCHEMA; //TODO 改成你自己的 + //} return null; } @@ -286,9 +288,8 @@ public DemoSQLConfig setDBAccount(String dbAccount) { this.dbAccount = dbAccount; return this; } - @JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息,用了 UnitAuto 则一定要加 @Override - public String getDBAccount() { + public String gainDBAccount() { if (StringUtil.isNotEmpty(dbAccount)) { return dbAccount; } @@ -299,10 +300,10 @@ public String getDBAccount() { if (isPostgreSQL()) { return "postgres"; //TODO 改成你自己的 } - // if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog - // return "demo"; //TODO 改成你自己的 - // //return "postgres"; //TODO 改成你自己的 - // } + //if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog + // return "demo"; //TODO 改成你自己的 + // //return "postgres"; //TODO 改成你自己的 + //} if (isSQLServer()) { return "sa"; //TODO 改成你自己的 } @@ -321,40 +322,40 @@ public String getDBAccount() { if (isTDengine()) { return "root"; //TODO 改成你自己的 } - // if (isTimescaleDB()) { - // return "postgres"; //TODO 改成你自己的 - // } - // if (isQuestDB()) { - // return "admin"; //TODO 改成你自己的 - // } + //if (isTimescaleDB()) { + // return "postgres"; //TODO 改成你自己的 + //} + if (isQuestDB()) { + return "admin"; //TODO 改成你自己的 + } if (isInfluxDB()) { return "iotos"; } if (isMilvus()) { return "root"; } - // if (isManticore()) { - // return null; // "root"; - // } - // if (isIoTDB()) { - // return "root"; - // } + //if (isManticore()) { + // return null; // "root"; + //} + //if (isIoTDB()) { + // return "root"; + //} if (isMongoDB()) { return "root"; //TODO 改成你自己的 } if (isCassandra()) { return "root"; //TODO 改成你自己的 } - // if (isDuckDB()) { - // return "root"; //TODO 改成你自己的 - // } - // if (isSurrealDB()) { - // return "root"; //TODO 改成你自己的 - // } - // if (isOpenGauss()) { - // return "postgres"; //TODO 改成你自己的 - // // 不允许用初始账号,需要 CREATE USER 创建新账号并 GRANT 授权 return "opengauss"; //TODO 改成你自己的 - // } + //if (isDuckDB()) { + // return "root"; //TODO 改成你自己的 + //} + //if (isSurrealDB()) { + // return "root"; //TODO 改成你自己的 + //} + //if (isOpenGauss()) { + // return "postgres"; //TODO 改成你自己的 + // // 不允许用初始账号,需要 CREATE USER 创建新账号并 GRANT 授权 return "opengauss"; //TODO 改成你自己的 + //} return null; } @@ -364,9 +365,8 @@ public DemoSQLConfig setDBPassword(String dbPassword) { this.dbPassword = dbPassword; return this; } - @JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息,用了 UnitAuto 则一定要加 @Override - public String getDBPassword() { + public String gainDBPassword() { if (StringUtil.isNotEmpty(dbPassword)) { return dbPassword; } @@ -377,10 +377,10 @@ public String getDBPassword() { if (isPostgreSQL()) { return null; //TODO 改成你自己的 } - // if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog - // return "demo39865"; //TODO 改成你自己的 - // // return null; //TODO 改成你自己的 - // } + //if (isCockroachDB()) { // PG JDBC 必须在 URI 传 catalog + // return "demo39865"; //TODO 改成你自己的 + // // return null; //TODO 改成你自己的 + //} if (isSQLServer()) { return "apijson@123"; //TODO 改成你自己的 } @@ -399,53 +399,53 @@ public String getDBPassword() { if (isTDengine()) { return "taosdata"; //TODO 改成你自己的 } - // if (isTimescaleDB()) { - // return "password"; //TODO 改成你自己的 - // } - // if (isQuestDB()) { - // return "quest"; //TODO 改成你自己的 - // } + if (isTimescaleDB()) { + return "password"; //TODO 改成你自己的 + } + if (isQuestDB()) { + return "quest"; //TODO 改成你自己的 + } if (isInfluxDB()) { return "apijson@123"; //TODO 改成你自己的 } if (isMilvus()) { return "apijson"; //TODO 改成你自己的 } - // if (isManticore()) { - // return null; - // } - // if (isIoTDB()) { - // return "root"; - // } + //if (isManticore()) { + // return null; + //} + //if (isIoTDB()) { + // return "root"; + //} if (isMongoDB()) { return "apijson"; //TODO 改成你自己的 } if (isCassandra()) { return "apijson"; //TODO 改成你自己的 } - // if (isDuckDB()) { - // return ""; //TODO 改成你自己的 - // } - // if (isSurrealDB()) { - // return "root"; //TODO 改成你自己的 - // } - // if (isOpenGauss()) { - // return "openGauss@123"; //TODO 改成你自己的 - // } + //if (isDuckDB()) { + // return ""; //TODO 改成你自己的 + //} + //if (isSurrealDB()) { + // return "root"; //TODO 改成你自己的 + //} + //if (isOpenGauss()) { + // return "openGauss@123"; //TODO 改成你自己的 + //} return null; } private String sql; - public String getSQL() throws Exception { - return getSQL(isPrepared()); + public String gainSQL() throws Exception { + return gainSQL(isPrepared()); } @Override - public String getSQL(boolean prepared) throws Exception { + public String gainSQL(boolean prepared) throws Exception { if (StringUtil.isNotEmpty(sql)) { return sql; } - return super.getSQL(prepared); + return super.gainSQL(prepared); } public void setSql(String sql) { @@ -517,15 +517,15 @@ public void setSql(String sql) { @Override - protected void onGetCrossJoinString(Join join) throws UnsupportedOperationException { + protected void onGainCrossJoinString(Join join) throws UnsupportedOperationException { // 开启 CROSS JOIN 笛卡尔积联表 super.onGetCrossJoinString(join); } @Override - protected void onJoinNotRelation(String sql, String quote, Join join, String table, List onList, On on) { + protected void onJoinNotRelation(String sql, String quote, Join join, String table, List onList, On on) { // 开启 JOIN ON t1.c1 != t2.c2 等不等式关联 super.onJoinNotRelation(sql, quote, join, table, onList, on); } @Override - protected void onJoinComplexRelation(String sql, String quote, Join join, String table, List onList, On on) { + protected void onJoinComplexRelation(String sql, String quote, Join join, String table, List onList, On on) { // 开启 JOIN ON t1.c1 LIKE concat('%', t2.c2, '%') 等复杂关联 super.onJoinComplexRelation(sql, quote, join, table, onList, on); } @@ -561,8 +561,8 @@ protected int getMaxCombineCount() { // } @Override - public String getSQLTable() { - String t = super.getSQLTable(); + public String gainSQLTable() { + String t = super.gainSQLTable(); return isInfluxDB() ? t.toLowerCase() : t; //return isInfluxDB() || isManticore() ? t.toLowerCase() : t; // return isInfluxDB() || isIoTDB() ? t.toLowerCase() : t; diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLExecutor.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLExecutor.java index afd939f..36ae487 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLExecutor.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLExecutor.java @@ -26,6 +26,7 @@ //import apijson.surrealdb.SurrealDBUtil; import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.JSONArray; //import org.duckdb.JsonNode; import org.springframework.data.redis.connection.RedisStandaloneConfiguration; import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; @@ -55,7 +56,7 @@ * * @author Lemon */ -public class DemoSQLExecutor extends APIJSONSQLExecutor { +public class DemoSQLExecutor extends APIJSONSQLExecutor { public static final String TAG = "DemoSQLExecutor"; // Redis 缓存 <<<<<<<<<<<<<<<<<<<<<<< @@ -76,7 +77,7 @@ public class DemoSQLExecutor extends APIJSONSQLExecutor { // 可重写以下方法,支持 Redis 等单机全局缓存或分布式缓存 @Override - public List getCache(String sql, SQLConfig config) { + public List getCache(String sql, SQLConfig config) { List list = super.getCache(sql, config); if (list == null) { try { @@ -89,7 +90,7 @@ public List getCache(String sql, SQLConfig config) { } @Override - public synchronized void putCache(String sql, List list, SQLConfig config) { + public synchronized void putCache(String sql, List list, SQLConfig config) { super.putCache(sql, list, config); String table = config != null && config.isMain() ? config.getTable() : null; @@ -107,7 +108,7 @@ public synchronized void putCache(String sql, List list, SQLConfig config) { + public synchronized void removeCache(String sql, SQLConfig config) { super.removeCache(sql, config); try { if (config.getMethod() == RequestMethod.DELETE) { // 避免缓存击穿 @@ -123,9 +124,9 @@ public synchronized void removeCache(String sql, SQLConfig config) { // Redis 缓存 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - // 适配连接池,如果这里能拿到连接池的有效 Connection,则 SQLConfig 不需要配置 dbVersion, dbUri, dbAccount, dbPassword + // 适配连接池,如果这里能拿到连接池的有效 Connection,则 SQLConfig 不需要配置 dbVersion, dbUri, dbAccount, dbPassword @Override - public Connection getConnection(SQLConfig config) throws Exception { + public Connection getConnection(SQLConfig config) throws Exception { String datasource = config.getDatasource(); Log.d(TAG, "getConnection config.getDatasource() = " + datasource); @@ -173,7 +174,7 @@ public Connection getConnection(SQLConfig config) throws Exception { } @Override - public JSONObject execute(@NotNull SQLConfig config, boolean unknownType) throws Exception { + public JSONObject execute(@NotNull SQLConfig config, boolean unknownType) throws Exception { boolean isMilvus = config.isMilvus(); // DATABASE_MILVUS.equals(config.getDatabase()); // APIJSON 6.4.0+ 可用 config.isMilvus(); boolean isCassandra = config.isCassandra(); // DemoSQLConfig.DATABASE_CASSANDRA.equals(config.getDatabase()); boolean isInfluxDB = config.isInfluxDB(); // DemoSQLConfig.DATABASE_INFLUXDB.equals(config.getDatabase()); @@ -182,7 +183,7 @@ public JSONObject execute(@NotNull SQLConfig config, boolean unknownType) if (isMilvus || isCassandra || isInfluxDB) { // || isIoTDB || isSurrealDB) { // TODO 把 execute 内与缓存无关只与数据库读写逻辑相关的代码抽取到 executeSQL 函数 - String sql = config.getSQL(false); // config.isPrepared()); + String sql = config.gainSQL(false); // config.isPrepared()); if (sql != null && config.getMethod() == null) { String trimmedSQL = sql.trim(); String sqlPrefix = trimmedSQL.length() < 7 ? "" : trimmedSQL.substring(0, 7).toUpperCase(); @@ -273,14 +274,14 @@ public void close() { // 不需要隐藏字段这个功能时,取消注释来提升性能 // @Override - // protected boolean isHideColumn(SQLConfig config, java.sql.ResultSet rs, ResultSetMetaData rsmd, int tablePosition, + // protected boolean isHideColumn(SQLConfig config, java.sql.ResultSet rs, ResultSetMetaData rsmd, int tablePosition, // JSONObject table, int columnIndex, Map childMap) throws SQLException { // return false; // } // 取消注释可将前端传参驼峰命名转为蛇形命名 aBCdEfg => upper ? A_B_CD_EFG : a_b_cd_efg // @Override - // protected String getKey(SQLConfig config, java.sql.ResultSet rs, ResultSetMetaData rsmd, int tablePosition, JSONObject table, int columnIndex, Map childMap) throws Exception { + // protected String getKey(SQLConfig config, java.sql.ResultSet rs, ResultSetMetaData rsmd, int tablePosition, JSONObject table, int columnIndex, Map childMap) throws Exception { // String key = super.getKey(config, rs, rsmd, tablePosition, table, columnIndex, childMap); // String tbl = StringUtil.firstCase(JSONResponse.formatUnderline(rsmd.getTableName(columnIndex), true), true); // if (DemoVerifier.SYSTEM_ACCESS_MAP.containsKey(tbl)) { @@ -290,13 +291,15 @@ public void close() { // } -// @Override -// protected Object getValue(SQLConfig config, ResultSet rs, ResultSetMetaData rsmd, int tablePosition, JSONObject table, int columnIndex, String lable, Map childMap) throws Exception { -// Object v = super.getValue(config, rs, rsmd, tablePosition, table, columnIndex, lable, childMap); -//// if (v instanceof JsonNode) { // DuckDB json 类型需要转换 -//// JsonNode jn = (JsonNode) v; -//// v = jn.isNull() ? null : JSON.parse(jn.toString()); -//// } -// return v; // MongoUtil.getValue(v); -// } + @Override + protected Object getValue( + SQLConfig config, ResultSet rs, ResultSetMetaData rsmd, int row, JSONObject table, int columnIndex + , String label, Map childMap, Map keyMap) throws Exception { + Object v = super.getValue(config, rs, rsmd, row, table, columnIndex, label, childMap, keyMap); +// if (v instanceof JsonNode) { // DuckDB json 类型需要转换 +// JsonNode jn = (JsonNode) v; +// v = jn.isNull() ? null : parseJSON(jn.toString()); +// } + return v; // MongoUtil.getValue(v); + } } diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoVerifier.java b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoVerifier.java index afc3a7b..4533616 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoVerifier.java +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoVerifier.java @@ -15,6 +15,8 @@ package apijson.demo; import apijson.router.APIJSONRouterVerifier; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import java.util.regex.Pattern; @@ -23,7 +25,7 @@ * 具体见 https://github.com/Tencent/APIJSON/issues/12 * @author Lemon */ -public class DemoVerifier extends APIJSONRouterVerifier { // APIJSONVerifier { +public class DemoVerifier extends APIJSONRouterVerifier { // APIJSONVerifier { public static final String TAG = "DemoVerifier"; static { @@ -39,7 +41,7 @@ public class DemoVerifier extends APIJSONRouterVerifier { // APIJSONVerif // 重写方法来自定义字段名等 // @Override - // public String getVisitorIdKey(SQLConfig config) { + // public String getVisitorIdKey(SQLConfig config) { // return super.getVisitorIdKey(config); // return "userid"; // return "uid" 等自定义的字段名 // } diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/CodeUtil.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/CodeUtil.js index 8a66958..518f95a 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/CodeUtil.js +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/CodeUtil.js @@ -266,7 +266,7 @@ var CodeUtil = { } else { try { - value = JSON.parse(value) + value = parseJSON(value) } catch (e) { console.log(e) @@ -972,13 +972,13 @@ var CodeUtil = { s += '\n\n//回调实体类' + '\n@Keep' - + '\nopen class ' + responseType + ' : BaseResponse {' + + '\nopen class ' + responseType + ' : BaseResponse {' + '\n' + nextPadding + '@Transient' + '\n' + nextPadding + 'open var ' + varName + ': ' + dataType + CodeUtil.initEmptyValue4Type(dataType, true, true) + '\n' + '\n}\n' + '\n//通用 HTTP 解析实体基类,全局存一份' + '\n@Keep' - + '\nopen class BaseResponse {' + + '\nopen class BaseResponse {' + '\n' + nextPadding + '@Transient' + '\n' + nextPadding + 'open var code: Int' + CodeUtil.initEmptyValue4Type('Int', true, true) + '\n' + '\n' + nextPadding + '@Transient' @@ -1166,40 +1166,40 @@ var CodeUtil = { } s += '\n\n' + - 'public class ' + responseType + ' extends Response {\n' + + 'public class ' + responseType + ' extends Response {\n' + nextPrefix + 'private ' + dataType + ' ' + varName + ';\n\n' + nextPrefix + 'public '+ dataType + ' get' + modelName + '() {\n' + nextNextPrefix + 'return ' + varName + ';\n' + nextPrefix + '}\n' + - nextPrefix + 'public ' + responseType + ' set' + modelName + '(' + dataType + ' ' + varName + ') {\n' + + nextPrefix + 'public ' + responseType + ' set' + modelName + '(' + dataType + ' ' + varName + ') {\n' + nextNextPrefix + 'this.' + varName + ' = ' + varName + ';\n' + nextNextPrefix + 'return this;\n' + nextPrefix + '}\n' + '}'; s += '\n\n' + - 'public class Response {\n' + + 'public class Response {\n' + nextPrefix + 'private int code;\n' + nextPrefix + 'private String msg;\n' + nextPrefix + 'private T data;\n\n' + nextPrefix + 'public int getCode() {\n' + nextNextPrefix + 'return code;\n' + nextPrefix + '}\n' + - nextPrefix + 'public Response setCode(int code) {\n' + + nextPrefix + 'public Response setCode(int code) {\n' + nextNextPrefix + 'this.code = code;\n' + nextNextPrefix + 'return this;\n' + nextPrefix + '}\n\n' + nextPrefix + 'public String getMsg() {\n' + nextNextPrefix + 'return msg;\n' + nextPrefix + '}\n' + - nextPrefix + 'public Response setMsg(String msg) {\n' + + nextPrefix + 'public Response setMsg(String msg) {\n' + nextNextPrefix + 'this.msg = msg;\n' + nextNextPrefix + 'return this;\n' + nextPrefix + '}\n\n' + nextPrefix + 'public T getData() {\n' + nextNextPrefix + 'return data;\n' + nextPrefix + '}\n' + - nextPrefix + 'public Response setData(T data) {\n' + + nextPrefix + 'public Response setData(T data) {\n' + nextNextPrefix + 'this.data = data;\n' + nextNextPrefix + 'return this;\n' + nextPrefix + '}\n' + @@ -1846,7 +1846,7 @@ var CodeUtil = { return CodeUtil.parseCode(name, resObj, { onParseParentStart: function () { - return depth > 0 || StringUtil.isEmpty(name_, true) == false ? '' : CodeUtil.getBlank(depth) + varKey + ' ' + name + ' = JSON.parse(resultJson) \n'; + return depth > 0 || StringUtil.isEmpty(name_, true) == false ? '' : CodeUtil.getBlank(depth) + varKey + ' ' + name + ' = parseJSON(resultJson) \n'; }, onParseParentEnd: function () { @@ -2695,7 +2695,7 @@ res_data = rep.json() else if (format instanceof Array == false && format instanceof Object) { s += prefix2 + varName + '_json = json.loads(' + varName + ')' try { - var realObj = JSON.parse(real); + var realObj = parseJSON(real); var cs = CodeUtil.parsePythonResponseByStandard(varName + '_json', key, format, realObj, depth, isSmart, true, funDefs, funNames); if (StringUtil.isNotEmpty(cs, true)) { s += '\n' + padding + cs.trim(); @@ -2759,7 +2759,7 @@ res_data = rep.json() return CodeUtil.parseCode(name, resObj, { onParseParentStart: function () { - return depth > 0 || StringUtil.isEmpty(name_, true) == false ? '' : CodeUtil.getBlank(depth) + varKey + ' ' + name + ': object = JSON.parse(resultJson); \n'; + return depth > 0 || StringUtil.isEmpty(name_, true) == false ? '' : CodeUtil.getBlank(depth) + varKey + ' ' + name + ': object = parseJSON(resultJson); \n'; }, onParseParentEnd: function () { @@ -7294,7 +7294,7 @@ res_data = rep.json() }, getType4Request: function (value) { - // return t != 'string' ? t : typeof JSON.parse(value); + // return t != 'string' ? t : typeof parseJSON(value); if (value instanceof Array) { return 'array' } diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/JSONRequest.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/JSONRequest.js index 20b97ba..79bca3b 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/JSONRequest.js +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/JSONRequest.js @@ -215,7 +215,7 @@ function format(json) { } try { - return JSON.stringify(JSON.parse(json), null, "\t"); + return JSON.stringify(parseJSON(json), null, "\t"); } catch(e) { log(TAG_REQUEST_UTIL, 'format try { ... } catch (err) { \n ' + e); return json; @@ -234,9 +234,9 @@ function format(json) { // var jsonObj; // if (typeof json == 'string'){ // try { - // jsonObj = JSON.parse(json); + // jsonObj = parseJSON(json); // } catch (err) { - // console.log('format try { jsonObj = JSON.parse(json); } catch (err) { \n ' + err); + // console.log('format try { jsonObj = parseJSON(json); } catch (err) { \n ' + err); // return json; // } // } @@ -266,7 +266,7 @@ function parseJSON(s) { } try { - return JSON.parse(s); + return parseJSON(s); } catch (e) { return JSON5.parse(s) } diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/JSONResponse.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/JSONResponse.js index 21a4321..065396f 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/JSONResponse.js +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/apijson/JSONResponse.js @@ -829,7 +829,7 @@ var JSONResponse = { } if (right instanceof Object) { - var m = JSON.parse(JSON.stringify(left)); + var m = parseJSON(JSON.stringify(left)); for (var k in right) { m[k] = JSONResponse.deepMerge(m[k], right[k]); } @@ -1036,7 +1036,7 @@ var JSONResponse = { } else if (format instanceof Array == false && format instanceof Object) { try { - var realObj = JSON.parse(real); + var realObj = parseJSON(real); var result = JSONResponse.compareWithStandard(format, realObj, folder, exceptKeys, ignoreTrend); if (guess == true) { result.code -= 1; @@ -1601,7 +1601,7 @@ var JSONResponse = { } catch (e) { log(e) try { - var realObj = JSON.parse(real); + var realObj = parseJSON(real); var format2 = JSONResponse.updateStandard(target.format, realObj, exceptKeys, ignoreTrend, key); if (format2 != null) { target.format = format2; diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/index.html b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/index.html index 2d8c495..ab29bad 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/index.html +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/index.html @@ -910,15 +910,15 @@ diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/jquery.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/jquery.js index 67e3160..24d1741 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/jquery.js +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/jquery.js @@ -521,7 +521,7 @@ jQuery.extend({ parseJSON: function( data ) { // Attempt to parse using the native JSON parser first if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); + return window.parseJSON( data ); } if ( data === null ) { @@ -555,7 +555,7 @@ jQuery.extend({ return null; } try { - if ( window.DOMParser ) { // Standard + if ( window.DOMParser ) { // Standard tmp = new DOMParser(); xml = tmp.parseFromString( data , "text/xml" ); } else { // IE diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/localforage.min.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/localforage.min.js index d8761e2..9467fa0 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/localforage.min.js +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/localforage.min.js @@ -4,4 +4,4 @@ https://localforage.github.io/localForage (c) 2013-2017 Mozilla, Apache License 2.0 */ -!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.localforage=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;ge;e++)d[e]=a.charCodeAt(e);return c}function m(a){return new ja(function(b){var c=a.transaction(ka,"readwrite"),d=i([""]);c.objectStore(ka).put(d,"key"),c.onabort=function(a){a.preventDefault(),a.stopPropagation(),b(!1)},c.oncomplete=function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/),c=navigator.userAgent.match(/Edge\//);b(c||!a||parseInt(a[1],10)>=43)}})["catch"](function(){return!1})}function n(a){return"boolean"==typeof ha?ja.resolve(ha):m(a).then(function(a){return ha=a})}function o(a){var b=ia[a.name],c={};c.promise=new ja(function(a){c.resolve=a}),b.deferredOperations.push(c),b.dbReady?b.dbReady=b.dbReady.then(function(){return c.promise}):b.dbReady=c.promise}function p(a){var b=ia[a.name],c=b.deferredOperations.pop();c&&c.resolve()}function q(a,b){return new ja(function(c,d){if(a.db){if(!b)return c(a.db);o(a),a.db.close()}var e=[a.name];b&&e.push(a.version);var f=ga.open.apply(ga,e);b&&(f.onupgradeneeded=function(b){var c=f.result;try{c.createObjectStore(a.storeName),b.oldVersion<=1&&c.createObjectStore(ka)}catch(d){if("ConstraintError"!==d.name)throw d;console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),f.onerror=function(a){a.preventDefault(),d(f.error)},f.onsuccess=function(){c(f.result),p(a)}})}function r(a){return q(a,!1)}function s(a){return q(a,!0)}function t(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.versiona.db.version;if(d&&(a.version!==b&&console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function u(a){return new ja(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function v(a){var b=l(atob(a.data));return i([b],{type:a.type})}function w(a){return a&&a.__local_forage_encoded_blob}function x(a){var b=this,c=b._initReady().then(function(){var a=ia[b._dbInfo.name];return a&&a.dbReady?a.dbReady:void 0});return k(c,a,a),c}function y(a){function b(){return ja.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];ia||(ia={});var f=ia[d.name];f||(f={forages:[],db:null,dbReady:null,deferredOperations:[]},ia[d.name]=f),f.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=x);for(var g=[],h=0;ha?void b(null):void c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=!1,h=f.openCursor();h.onsuccess=function(){var c=h.result;return c?void(0===a?b(c.key):g?b(c.key):(g=!0,c.advance(a))):void b(null)},h.onerror=function(){d(h.error)}})["catch"](d)});return j(d,b),d}function G(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.openCursor(),g=[];f.onsuccess=function(){var b=f.result;return b?(g.push(b.key),void b["continue"]()):void a(g)},f.onerror=function(){c(f.error)}})["catch"](c)});return j(c,a),c}function H(a){var b,c,d,e,f,g=.75*a.length,h=a.length,i=0;"="===a[a.length-1]&&(g--,"="===a[a.length-2]&&g--);var j=new ArrayBuffer(g),k=new Uint8Array(j);for(b=0;h>b;b+=4)c=na.indexOf(a[b]),d=na.indexOf(a[b+1]),e=na.indexOf(a[b+2]),f=na.indexOf(a[b+3]),k[i++]=c<<2|d>>4,k[i++]=(15&d)<<4|e>>2,k[i++]=(3&e)<<6|63&f;return j}function I(a){var b,c=new Uint8Array(a),d="";for(b=0;b>2],d+=na[(3&c[b])<<4|c[b+1]>>4],d+=na[(15&c[b+1])<<2|c[b+2]>>6],d+=na[63&c[b+2]];return c.length%3===2?d=d.substring(0,d.length-1)+"=":c.length%3===1&&(d=d.substring(0,d.length-2)+"=="),d}function J(a,b){var c="";if(a&&(c=Ea.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===Ea.call(a.buffer))){var d,e=qa;a instanceof ArrayBuffer?(d=a,e+=sa):(d=a.buffer,"[object Int8Array]"===c?e+=ua:"[object Uint8Array]"===c?e+=va:"[object Uint8ClampedArray]"===c?e+=wa:"[object Int16Array]"===c?e+=xa:"[object Uint16Array]"===c?e+=za:"[object Int32Array]"===c?e+=ya:"[object Uint32Array]"===c?e+=Aa:"[object Float32Array]"===c?e+=Ba:"[object Float64Array]"===c?e+=Ca:b(new Error("Failed to get type for BinaryArray"))),b(e+I(d))}else if("[object Blob]"===c){var f=new FileReader;f.onload=function(){var c=oa+a.type+"~"+I(this.result);b(qa+ta+c)},f.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(g){console.error("Couldn't convert value into a JSON string: ",a),b(null,g)}}function K(a){if(a.substring(0,ra)!==qa)return JSON.parse(a);var b,c=a.substring(Da),d=a.substring(ra,Da);if(d===ta&&pa.test(c)){var e=c.match(pa);b=e[1],c=c.substring(e[0].length)}var f=H(c);switch(d){case sa:return f;case ta:return i([f],{type:b});case ua:return new Int8Array(f);case va:return new Uint8Array(f);case wa:return new Uint8ClampedArray(f);case xa:return new Int16Array(f);case za:return new Uint16Array(f);case ya:return new Int32Array(f);case Aa:return new Uint32Array(f);case Ba:return new Float32Array(f);case Ca:return new Float64Array(f);default:throw new Error("Unkown type: "+d)}}function L(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"!=typeof a[d]?a[d].toString():a[d];var e=new ja(function(a,d){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(e){return d(e)}c.db.transaction(function(e){e.executeSql("CREATE TABLE IF NOT EXISTS "+c.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){b._dbInfo=c,a()},function(a,b){d(b)})})});return c.serializer=Fa,e}function M(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[a],function(a,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),b(d)},function(a,b){d(b)})})})["catch"](d)});return j(d,b),d}function N(a,b){var c=this,d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;g>h;h++){var i=f.item(h),j=i.value;if(j&&(j=e.serializer.deserialize(j)),j=a(j,i.key,h+1),void 0!==j)return void b(j)}b()},function(a,b){d(b)})})})["catch"](d)});return j(d,b),d}function O(a,b,c,d){var e=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var f=new ja(function(f,g){e.ready().then(function(){void 0===b&&(b=null);var h=b,i=e._dbInfo;i.serializer.serialize(b,function(b,j){j?g(j):i.db.transaction(function(c){c.executeSql("INSERT OR REPLACE INTO "+i.storeName+" (key, value) VALUES (?, ?)",[a,b],function(){f(h)},function(a,b){g(b)})},function(b){if(b.code===b.QUOTA_ERR){if(d>0)return void f(O.apply(e,[a,h,c,d-1]));g(b)}})})})["catch"](g)});return j(f,c),f}function P(a,b,c){return O.apply(this,[a,b,c,1])}function Q(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("DELETE FROM "+e.storeName+" WHERE key = ?",[a],function(){b()},function(a,b){d(b)})})})["catch"](d)});return j(d,b),d}function R(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})})["catch"](c)});return j(c,a),c}function S(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})})["catch"](c)});return j(c,a),c}function T(a,b){var c=this,d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})})["catch"](d)});return j(d,b),d}function U(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e=0;c--){var d=localStorage.key(c);0===d.indexOf(a)&&localStorage.removeItem(d)}});return j(c,a),c}function X(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo,d=localStorage.getItem(b.keyPrefix+a);return d&&(d=b.serializer.deserialize(d)),d});return j(d,b),d}function Y(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=localStorage.length,g=1,h=0;f>h;h++){var i=localStorage.key(h);if(0===i.indexOf(d)){var j=localStorage.getItem(i);if(j&&(j=b.serializer.deserialize(j)),j=a(j,i.substring(e),g++),void 0!==j)return j}}});return j(d,b),d}function Z(a,b){var c=this,d=c.ready().then(function(){var b,d=c._dbInfo;try{b=localStorage.key(a)}catch(e){b=null}return b&&(b=b.substring(d.keyPrefix.length)),b});return j(d,b),d}function $(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo,c=localStorage.length,d=[],e=0;c>e;e++)0===localStorage.key(e).indexOf(a.keyPrefix)&&d.push(localStorage.key(e).substring(a.keyPrefix.length));return d});return j(c,a),c}function _(a){var b=this,c=b.keys().then(function(a){return a.length});return j(c,a),c}function aa(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo;localStorage.removeItem(b.keyPrefix+a)});return j(d,b),d}function ba(a,b,c){var d=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=d.ready().then(function(){void 0===b&&(b=null);var c=b;return new ja(function(e,f){var g=d._dbInfo;g.serializer.serialize(b,function(b,d){if(d)f(d);else try{localStorage.setItem(g.keyPrefix+a,b),e(c)}catch(h){"QuotaExceededError"!==h.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==h.name||f(h),f(h)}})})});return j(e,c),e}function ca(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function da(){for(var a=1;ac;c++){var e=a[c];this.supports(e)&&b.push(e)}return b},a.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0;ae;e++)d[e]=a.charCodeAt(e);return c}function m(a){return new ja(function(b){var c=a.transaction(ka,"readwrite"),d=i([""]);c.objectStore(ka).put(d,"key"),c.onabort=function(a){a.preventDefault(),a.stopPropagation(),b(!1)},c.oncomplete=function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/),c=navigator.userAgent.match(/Edge\//);b(c||!a||parseInt(a[1],10)>=43)}})["catch"](function(){return!1})}function n(a){return"boolean"==typeof ha?ja.resolve(ha):m(a).then(function(a){return ha=a})}function o(a){var b=ia[a.name],c={};c.promise=new ja(function(a){c.resolve=a}),b.deferredOperations.push(c),b.dbReady?b.dbReady=b.dbReady.then(function(){return c.promise}):b.dbReady=c.promise}function p(a){var b=ia[a.name],c=b.deferredOperations.pop();c&&c.resolve()}function q(a,b){return new ja(function(c,d){if(a.db){if(!b)return c(a.db);o(a),a.db.close()}var e=[a.name];b&&e.push(a.version);var f=ga.open.apply(ga,e);b&&(f.onupgradeneeded=function(b){var c=f.result;try{c.createObjectStore(a.storeName),b.oldVersion<=1&&c.createObjectStore(ka)}catch(d){if("ConstraintError"!==d.name)throw d;console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),f.onerror=function(a){a.preventDefault(),d(f.error)},f.onsuccess=function(){c(f.result),p(a)}})}function r(a){return q(a,!1)}function s(a){return q(a,!0)}function t(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.versiona.db.version;if(d&&(a.version!==b&&console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function u(a){return new ja(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function v(a){var b=l(atob(a.data));return i([b],{type:a.type})}function w(a){return a&&a.__local_forage_encoded_blob}function x(a){var b=this,c=b._initReady().then(function(){var a=ia[b._dbInfo.name];return a&&a.dbReady?a.dbReady:void 0});return k(c,a,a),c}function y(a){function b(){return ja.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];ia||(ia={});var f=ia[d.name];f||(f={forages:[],db:null,dbReady:null,deferredOperations:[]},ia[d.name]=f),f.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=x);for(var g=[],h=0;ha?void b(null):void c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=!1,h=f.openCursor();h.onsuccess=function(){var c=h.result;return c?void(0===a?b(c.key):g?b(c.key):(g=!0,c.advance(a))):void b(null)},h.onerror=function(){d(h.error)}})["catch"](d)});return j(d,b),d}function G(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.openCursor(),g=[];f.onsuccess=function(){var b=f.result;return b?(g.push(b.key),void b["continue"]()):void a(g)},f.onerror=function(){c(f.error)}})["catch"](c)});return j(c,a),c}function H(a){var b,c,d,e,f,g=.75*a.length,h=a.length,i=0;"="===a[a.length-1]&&(g--,"="===a[a.length-2]&&g--);var j=new ArrayBuffer(g),k=new Uint8Array(j);for(b=0;h>b;b+=4)c=na.indexOf(a[b]),d=na.indexOf(a[b+1]),e=na.indexOf(a[b+2]),f=na.indexOf(a[b+3]),k[i++]=c<<2|d>>4,k[i++]=(15&d)<<4|e>>2,k[i++]=(3&e)<<6|63&f;return j}function I(a){var b,c=new Uint8Array(a),d="";for(b=0;b>2],d+=na[(3&c[b])<<4|c[b+1]>>4],d+=na[(15&c[b+1])<<2|c[b+2]>>6],d+=na[63&c[b+2]];return c.length%3===2?d=d.substring(0,d.length-1)+"=":c.length%3===1&&(d=d.substring(0,d.length-2)+"=="),d}function J(a,b){var c="";if(a&&(c=Ea.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===Ea.call(a.buffer))){var d,e=qa;a instanceof ArrayBuffer?(d=a,e+=sa):(d=a.buffer,"[object Int8Array]"===c?e+=ua:"[object Uint8Array]"===c?e+=va:"[object Uint8ClampedArray]"===c?e+=wa:"[object Int16Array]"===c?e+=xa:"[object Uint16Array]"===c?e+=za:"[object Int32Array]"===c?e+=ya:"[object Uint32Array]"===c?e+=Aa:"[object Float32Array]"===c?e+=Ba:"[object Float64Array]"===c?e+=Ca:b(new Error("Failed to get type for BinaryArray"))),b(e+I(d))}else if("[object Blob]"===c){var f=new FileReader;f.onload=function(){var c=oa+a.type+"~"+I(this.result);b(qa+ta+c)},f.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(g){console.error("Couldn't convert value into a JSON string: ",a),b(null,g)}}function K(a){if(a.substring(0,ra)!==qa)return parseJSON(a);var b,c=a.substring(Da),d=a.substring(ra,Da);if(d===ta&&pa.test(c)){var e=c.match(pa);b=e[1],c=c.substring(e[0].length)}var f=H(c);switch(d){case sa:return f;case ta:return i([f],{type:b});case ua:return new Int8Array(f);case va:return new Uint8Array(f);case wa:return new Uint8ClampedArray(f);case xa:return new Int16Array(f);case za:return new Uint16Array(f);case ya:return new Int32Array(f);case Aa:return new Uint32Array(f);case Ba:return new Float32Array(f);case Ca:return new Float64Array(f);default:throw new Error("Unkown type: "+d)}}function L(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"!=typeof a[d]?a[d].toString():a[d];var e=new ja(function(a,d){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(e){return d(e)}c.db.transaction(function(e){e.executeSql("CREATE TABLE IF NOT EXISTS "+c.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){b._dbInfo=c,a()},function(a,b){d(b)})})});return c.serializer=Fa,e}function M(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[a],function(a,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),b(d)},function(a,b){d(b)})})})["catch"](d)});return j(d,b),d}function N(a,b){var c=this,d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;g>h;h++){var i=f.item(h),j=i.value;if(j&&(j=e.serializer.deserialize(j)),j=a(j,i.key,h+1),void 0!==j)return void b(j)}b()},function(a,b){d(b)})})})["catch"](d)});return j(d,b),d}function O(a,b,c,d){var e=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var f=new ja(function(f,g){e.ready().then(function(){void 0===b&&(b=null);var h=b,i=e._dbInfo;i.serializer.serialize(b,function(b,j){j?g(j):i.db.transaction(function(c){c.executeSql("INSERT OR REPLACE INTO "+i.storeName+" (key, value) VALUES (?, ?)",[a,b],function(){f(h)},function(a,b){g(b)})},function(b){if(b.code===b.QUOTA_ERR){if(d>0)return void f(O.apply(e,[a,h,c,d-1]));g(b)}})})})["catch"](g)});return j(f,c),f}function P(a,b,c){return O.apply(this,[a,b,c,1])}function Q(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("DELETE FROM "+e.storeName+" WHERE key = ?",[a],function(){b()},function(a,b){d(b)})})})["catch"](d)});return j(d,b),d}function R(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})})["catch"](c)});return j(c,a),c}function S(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})})["catch"](c)});return j(c,a),c}function T(a,b){var c=this,d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})})["catch"](d)});return j(d,b),d}function U(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e=0;c--){var d=localStorage.key(c);0===d.indexOf(a)&&localStorage.removeItem(d)}});return j(c,a),c}function X(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo,d=localStorage.getItem(b.keyPrefix+a);return d&&(d=b.serializer.deserialize(d)),d});return j(d,b),d}function Y(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=localStorage.length,g=1,h=0;f>h;h++){var i=localStorage.key(h);if(0===i.indexOf(d)){var j=localStorage.getItem(i);if(j&&(j=b.serializer.deserialize(j)),j=a(j,i.substring(e),g++),void 0!==j)return j}}});return j(d,b),d}function Z(a,b){var c=this,d=c.ready().then(function(){var b,d=c._dbInfo;try{b=localStorage.key(a)}catch(e){b=null}return b&&(b=b.substring(d.keyPrefix.length)),b});return j(d,b),d}function $(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo,c=localStorage.length,d=[],e=0;c>e;e++)0===localStorage.key(e).indexOf(a.keyPrefix)&&d.push(localStorage.key(e).substring(a.keyPrefix.length));return d});return j(c,a),c}function _(a){var b=this,c=b.keys().then(function(a){return a.length});return j(c,a),c}function aa(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo;localStorage.removeItem(b.keyPrefix+a)});return j(d,b),d}function ba(a,b,c){var d=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=d.ready().then(function(){void 0===b&&(b=null);var c=b;return new ja(function(e,f){var g=d._dbInfo;g.serializer.serialize(b,function(b,d){if(d)f(d);else try{localStorage.setItem(g.keyPrefix+a,b),e(c)}catch(h){"QuotaExceededError"!==h.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==h.name||f(h),f(h)}})})});return j(e,c),e}function ca(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function da(){for(var a=1;ac;c++){var e=a[c];this.supports(e)&&b.push(e)}return b},a.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0;a= 0 && i2 >= 0 && i2 < i) { valString = valString.substring(i2 + 1, i + 1) // alert('valString = ' + valString) - var _$_this_$_ = JSON.parse(valString) || {} + var _$_this_$_ = parseJSON(valString) || {} path = _$_this_$_._$_path_$_ table = _$_this_$_._$_table_$_ } @@ -435,7 +435,7 @@ if (i >= 0 && i2 >= 0 && i2 < i) { valString = valString.substring(i2 + 1, i + 1) // alert('valString = ' + valString) - var _$_this_$_ = JSON.parse(valString) || {} + var _$_this_$_ = parseJSON(valString) || {} path = _$_this_$_ == null ? '' : _$_this_$_._$_path_$_ table = _$_this_$_ == null ? '' : _$_this_$_._$_table_$_ } @@ -473,7 +473,7 @@ var tr = App.currentRemoteItem.TestRecord || {}; var d = App.currentRemoteItem.Document || {}; var standard = App.isMLEnabled ? tr.standard : tr.response; - var standardObj = StringUtil.isEmpty(standard, true) ? null : JSON.parse(standard); + var standardObj = StringUtil.isEmpty(standard, true) ? null : parseJSON(standard); var tests = App.tests[String(App.currentAccountIndex)] || {}; var responseObj = (tests[d.id] || {})[0] @@ -519,7 +519,7 @@ var tr = App.currentRemoteItem.TestRecord || {}; var d = App.currentRemoteItem.Document || {}; var standard = App.isMLEnabled ? tr.standard : tr.response; - var standardObj = StringUtil.isEmpty(standard, true) ? null : JSON.parse(standard); + var standardObj = StringUtil.isEmpty(standard, true) ? null : parseJSON(standard); var tests = App.tests[String(App.currentAccountIndex)] || {}; var responseObj = (tests[d.id] || {})[0] @@ -707,7 +707,7 @@ https://github.com/Tencent/APIJSON/issues var v = decodeURIComponent(part.substring(ind+1)); if (tryParse == true) { try { - v = JSON.parse(v) + v = parseJSON(v) } catch (e) { console.log(e) @@ -1559,7 +1559,7 @@ https://github.com/Tencent/APIJSON/issues var tr = cri.TestRecord || {}; var d = cri.Document || {}; var standard = this.isMLEnabled ? tr.standard : tr.response; - var standardObj = StringUtil.isEmpty(standard, true) ? null : JSON.parse(standard); + var standardObj = StringUtil.isEmpty(standard, true) ? null : parseJSON(standard); var tests = this.tests[String(this.currentAccountIndex)] || {}; var responseObj = (tests[d.id] || {})[0] @@ -1607,7 +1607,7 @@ https://github.com/Tencent/APIJSON/issues var tr = cri.TestRecord || {}; var d = cri.Document || {}; var standard = this.isMLEnabled ? tr.standard : tr.response; - var standardObj = StringUtil.isEmpty(standard, true) ? null : JSON.parse(standard); + var standardObj = StringUtil.isEmpty(standard, true) ? null : parseJSON(standard); var tests = this.tests[String(this.currentAccountIndex)] || {}; var responseObj = (tests[d.id] || {})[0] @@ -1901,7 +1901,7 @@ https://github.com/Tencent/APIJSON/issues var jsonStr = json == null ? null : (typeof json == 'string' ? json : JSON.stringify(json)) if (this.isTestCaseShow != true && jsonStr == null) { // StringUtil.isEmpty(jsonStr) try { - jsonStr = JSON.stringify(encode(JSON.parse(vInput.value))) + jsonStr = JSON.stringify(encode(parseJSON(vInput.value))) } catch (e) { // 可能包含注释 log(e) jsonStr = encode(StringUtil.trim(vInput.value)) @@ -2222,7 +2222,7 @@ https://github.com/Tencent/APIJSON/issues apiMap[url] = { name: name, request: typeAndParam.param, - response: api.res_body == null ? null : JSON.parse(api.res_body), + response: api.res_body == null ? null : parseJSON(api.res_body), detail: name + '\n' + (api.up_time == null ? '' : (typeof api.up_time != 'number' ? api.up_time : new Date(1000*api.up_time).toLocaleString())) + '\nhttp://apijson.cn/yapi/project/1/interface/api/' + api._id @@ -2877,7 +2877,7 @@ https://github.com/Tencent/APIJSON/issues saveTextAs(txt, clazz) } else { - var res = JSON.parse(this.jsoncon) + var res = parseJSON(this.jsoncon) res = this.removeDebugInfo(res) var s = '' @@ -3032,7 +3032,7 @@ https://github.com/Tencent/APIJSON/issues this.isTestCaseShow = false - const currentResponse = this.view != 'code' || StringUtil.isEmpty(this.jsoncon, true) ? {} : this.removeDebugInfo(JSON.parse(this.jsoncon)); + const currentResponse = this.view != 'code' || StringUtil.isEmpty(this.jsoncon, true) ? {} : this.removeDebugInfo(parseJSON(this.jsoncon)); const after = isSingle ? this.switchQuote(inputted) : inputted; // this.toDoubleJSON(inputted); const inputObj = this.getRequest(after, {}); @@ -3043,7 +3043,7 @@ https://github.com/Tencent/APIJSON/issues if (isExportRandom != true) { var commentStddObj = null try { - commentStddObj = JSON.parse(isEditResponse ? tr.standard : doc.standard); + commentStddObj = parseJSON(isEditResponse ? tr.standard : doc.standard); } catch(e) { log(e) @@ -3155,7 +3155,7 @@ https://github.com/Tencent/APIJSON/issues // var k = cfgLine.substring(0, ind).replaceAll('/', '.'); // .trim(); // var v = cfgLine.substring(ind + 1).trim(); // try { - // v = JSON.parse(v); + // v = parseJSON(v); // } // catch (e) { // log(e) @@ -3877,7 +3877,7 @@ https://github.com/Tencent/APIJSON/issues var jsonData = null try { - jsonData = JSON.parse(docUrl) + jsonData = parseJSON(docUrl) } catch (e) {} @@ -4194,7 +4194,7 @@ https://github.com/Tencent/APIJSON/issues break default: type = REQUEST_TYPE_JSON - parameters = api.req_body_other == null ? null : JSON.parse(api.req_body_other) + parameters = api.req_body_other == null ? null : parseJSON(api.req_body_other) var params = parameters.properties || {} var required = parameters.required || [] @@ -5580,9 +5580,9 @@ https://github.com/Tencent/APIJSON/issues getCache: function (url, key, defaultValue) { var cache = localStorage.getItem('APIAuto:' + url) try { - cache = JSON.parse(cache) + cache = parseJSON(cache) } catch(e) { - this.log('login this.send >> try { cache = JSON.parse(cache) } catch(e) {\n' + e.message) + this.log('login this.send >> try { cache = parseJSON(cache) } catch(e) {\n' + e.message) } cache = cache || {} var val = key == null ? cache : cache[key] @@ -6294,14 +6294,14 @@ https://github.com/Tencent/APIJSON/issues try { var standardObj = null; try { - standardObj = JSON.parse(currentItem.standard); + standardObj = parseJSON(currentItem.standard); } catch (e3) { log(e3) } var isAPIJSONRouter = false; try { - var apijson = JSON.parse(currentItem.apijson); + var apijson = parseJSON(currentItem.apijson); isAPIJSONRouter = JSONResponse.isObject(apijson) } catch (e3) { log(e3) @@ -7923,16 +7923,16 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea case CodeUtil.LANGUAGE_KOTLIN: s += '\n#### <= Android-Kotlin: 空对象用 HashMap<String, Any>(),空数组用 ArrayList<Any>()\n' + '```kotlin \n' - + CodeUtil.parseKotlinRequest(null, JSON.parse(rq), 0, isSingle, false, false, this.type, this.getBaseUrl(), '/' + this.getMethod(), this.urlComment) + + CodeUtil.parseKotlinRequest(null, parseJSON(rq), 0, isSingle, false, false, this.type, this.getBaseUrl(), '/' + this.getMethod(), this.urlComment) + '\n ``` \n注:对象 {} 用 mapOf("key": value),数组 [] 用 listOf(value0, value1)\n'; break; case CodeUtil.LANGUAGE_JAVA: s += '\n#### <= Android-Java: 同名变量需要重命名' + ' \n ```java \n' - + StringUtil.trim(CodeUtil.parseJavaRequest(null, JSON.parse(rq), 0, isSingle, false, false, this.type, '/' + this.getMethod(), this.urlComment)) + + StringUtil.trim(CodeUtil.parseJavaRequest(null, parseJSON(rq), 0, isSingle, false, false, this.type, '/' + this.getMethod(), this.urlComment)) + '\n ``` \n注:' + (isSingle ? '用了 APIJSON 的 JSONRequest, JSONResponse 类,也可使用其它类封装,只要 JSON 有序就行\n' : 'LinkedHashMap<>() 可替换为 fastjson 的 JSONObject(true) 等有序JSON构造方法\n'); - var serverCode = CodeUtil.parseJavaServer(this.type, '/' + this.getMethod(), this.database, this.schema, JSON.parse(rq), isSingle); + var serverCode = CodeUtil.parseJavaServer(this.type, '/' + this.getMethod(), this.database, this.schema, parseJSON(rq), isSingle); if (StringUtil.isEmpty(serverCode, true) != true) { s += '\n#### <= Server-Java: RESTful 等非 APIJSON 规范的 API' + ' \n ```java \n' @@ -7943,46 +7943,46 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea case CodeUtil.LANGUAGE_C_SHARP: s += '\n#### <= Unity3D-C\#: 键值对用 {"key", value}' + '\n ```csharp \n' - + CodeUtil.parseCSharpRequest(null, JSON.parse(rq), 0) + + CodeUtil.parseCSharpRequest(null, parseJSON(rq), 0) + '\n ``` \n注:对象 {} 用 new JObject{{"key", value}},数组 [] 用 new JArray{value0, value1}\n'; break; case CodeUtil.LANGUAGE_SWIFT: s += '\n#### <= iOS-Swift: 空对象用 [ : ]' + '\n ```swift \n' - + CodeUtil.parseSwiftRequest(null, JSON.parse(rq), 0) + + CodeUtil.parseSwiftRequest(null, parseJSON(rq), 0) + '\n ``` \n注:对象 {} 用 ["key": value],数组 [] 用 [value0, value1]\n'; break; // case CodeUtil.LANGUAGE_OBJECTIVE_C: // s += '\n#### <= iOS-Objective-C \n ```objective-c \n' -// + CodeUtil.parseObjectiveCRequest(null, JSON.parse(rq)) +// + CodeUtil.parseObjectiveCRequest(null, parseJSON(rq)) // + '\n ``` \n'; // break; case CodeUtil.LANGUAGE_GO: s += '\n#### <= Web-Go: 对象 key: value 会被强制排序,每个 key: value 最后都要加逗号 ","' + ' \n ```go \n' - + CodeUtil.parseGoRequest(null, JSON.parse(rq), 0) + + CodeUtil.parseGoRequest(null, parseJSON(rq), 0) + '\n ``` \n注:对象 {} 用 map[string]interface{} {"key": value},数组 [] 用 []interface{} {value0, value1}\n'; break; case CodeUtil.LANGUAGE_C_PLUS_PLUS: s += '\n#### <= Web-C++: 使用 RapidJSON' + ' \n ```cpp \n' - + StringUtil.trim(CodeUtil.parseCppRequest(null, JSON.parse(rq), 0, isSingle)) + + StringUtil.trim(CodeUtil.parseCppRequest(null, parseJSON(rq), 0, isSingle)) + '\n ``` \n注:std::string 类型值需要判断 RAPIDJSON_HAS_STDSTRING\n'; break; case CodeUtil.LANGUAGE_PHP: s += '\n#### <= Web-PHP: 空对象用 (object) ' + (isSingle ? '[]' : 'array()') + ' \n ```php \n' - + CodeUtil.parsePHPRequest(null, JSON.parse(rq), 0, isSingle) + + CodeUtil.parsePHPRequest(null, parseJSON(rq), 0, isSingle) + '\n ``` \n注:对象 {} 用 ' + (isSingle ? '[\'key\' => value]' : 'array("key" => value)') + ',数组 [] 用 ' + (isSingle ? '[value0, value1]\n' : 'array(value0, value1)\n'); break; case CodeUtil.LANGUAGE_PYTHON: s += '\n#### <= Web-Python: 注释符用 \'\#\'' + ' \n ```python \n' - + CodeUtil.parsePythonRequest(null, JSON.parse(rq), 0, isSingle, vInput.value) + + CodeUtil.parsePythonRequest(null, parseJSON(rq), 0, isSingle, vInput.value) + '\n ``` \n注:关键词转换 null: None, false: False, true: True'; break; @@ -8259,7 +8259,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea map[StringUtil.toLowerCase(item.schema) + '.' + StringUtil.toLowerCase(item.name)] = item function getShowString(method, lineItemCount) { - var roles = item[method] == null ? null : JSON.parse(item[method]) + var roles = item[method] == null ? null : parseJSON(item[method]) var rs = [] if (roles != null) { var schemaStr = StringUtil.isEmpty(item.schema) ? 'null' : "'" + item.schema + "'" @@ -9407,7 +9407,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea var header = this.getHeader(vHeader.value) var callback = null - var data = isPre ? undefined : (this.jsoncon == null ? null : JSON.parse(this.jsoncon)) + var data = isPre ? undefined : (this.jsoncon == null ? null : parseJSON(this.jsoncon)) var res = isPre ? undefined : { data: data } @@ -9592,14 +9592,14 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea var random = item.Random = item.Random || {} var subs = item['[]'] || [] var existCount = subs.length - subs = existCount <= 0 ? subs : JSON.parse(JSON.stringify(subs)) + subs = existCount <= 0 ? subs : parseJSON(JSON.stringify(subs)) var count = random.count || 0 var respCount = 0; for (var i = 0; i < count; i ++) { // var constConfig = i < existCount ? ((subs[i] || {}).Random || {}).config : this.getRandomConstConfig(random.config, random.id) //第1遍,把 key : expression 改为 key : value - // var constJson = this.getRandomJSON(JSON.parse(JSON.stringify(json)), constConfig, random.id) //第2遍,用新的 random config 来修改原 json + // var constJson = this.getRandomJSON(parseJSON(JSON.stringify(json)), constConfig, random.id) //第2遍,用新的 random config 来修改原 json const which = i; var rawConfig = testSubList && i < existCount ? ((subs[i] || {}).Random || {}).config : random.config @@ -9615,7 +9615,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea try { this.parseRandom( - JSON.parse(JSON.stringify(json)), rawConfig, random.id + parseJSON(JSON.stringify(json)), rawConfig, random.id , ! testSubList, testSubList && i >= existCount, testSubList && i >= existCount , function (randomName, constConfig, constJson) { @@ -10731,7 +10731,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea stdd = stdd || ((this.currentRemoteItem || {}).TestRecord || {})[standardKey] } - var standard = typeof stdd != 'string' ? stdd : (StringUtil.isEmpty(stdd, true) ? null : JSON.parse(stdd)) + var standard = typeof stdd != 'string' ? stdd : (StringUtil.isEmpty(stdd, true) ? null : parseJSON(stdd)) tr.compare = JSONResponse.compareResponse(res, standard, this.removeDebugInfo(response) || {}, '', isML, null, null, ignoreTrend) || {} tr.compare.duration = it.durationHint } @@ -11298,7 +11298,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea saveTextAs( '# APIJSON自动化回归测试-前\n主页: https://github.com/Tencent/APIJSON' + '\n\n接口名称: \n' + (document.version > 0 ? 'V' + document.version : 'V*') + ' ' + document.name - + '\n返回结果: \n' + JSON.stringify(JSON.parse(testRecord.response || '{}'), null, ' ') + + '\n返回结果: \n' + JSON.stringify(parseJSON(testRecord.response || '{}'), null, ' ') , '测试:' + document.name + '-前.txt' ) @@ -11324,7 +11324,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea '# APIJSON自动化回归测试-标准\n主页: https://github.com/Tencent/APIJSON' + '\n\n接口名称: \n' + (document.version > 0 ? 'V' + document.version : 'V*') + ' ' + document.name + '\n测试结果: \n' + JSON.stringify(testRecord.compare || '{}', null, ' ') - + '\n测试标准: \n' + JSON.stringify(JSON.parse(testRecord.standard || '{}'), null, ' ') + + '\n测试标准: \n' + JSON.stringify(parseJSON(testRecord.standard || '{}'), null, ' ') , '测试:' + document.name + '-标准.txt' ) }, 5000) @@ -11377,7 +11377,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea ] if (pathKeys.length > 0) { - var curRsp = StringUtil.isEmpty(testRecord.response) ? {} : JSON.parse(testRecord.response); + var curRsp = StringUtil.isEmpty(testRecord.response) ? {} : parseJSON(testRecord.response); JSONResponse.setValByPath(curRsp, pathKeys, JSONResponse.getValByPath(currentResponse, pathKeys)); currentResponse = curRsp; } @@ -11443,7 +11443,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea item.TestRecord = null } - App.updateTestRecord(0, list, index, item, rawRspStr == null ? null : JSON.parse(rawRspStr), isRandom, true, App.currentAccountIndex, isCross) + App.updateTestRecord(0, list, index, item, rawRspStr == null ? null : parseJSON(rawRspStr), isRandom, true, App.currentAccountIndex, isCross) }) } else { //上传新的校验标准 @@ -11489,11 +11489,11 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea } } else { - standard = (StringUtil.isEmpty(testRecord.standard, true) ? null : JSON.parse(testRecord.standard)) || {} + standard = (StringUtil.isEmpty(testRecord.standard, true) ? null : parseJSON(testRecord.standard)) || {} if (pathKeys.length <= 0) { - stddObj = JSONResponse.updateFullStandard(standard, rawRspStr == null ? null : JSON.parse(rawRspStr), isML) + stddObj = JSONResponse.updateFullStandard(standard, rawRspStr == null ? null : parseJSON(rawRspStr), isML) } else if (isML) { - stddObj = JSONResponse.updateStandardByPath(standard, pathNames, lastKey, rawRspStr == null ? null : JSON.parse(rawRspStr)) + stddObj = JSONResponse.updateStandardByPath(standard, pathNames, lastKey, rawRspStr == null ? null : parseJSON(rawRspStr)) } } @@ -11614,7 +11614,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea // } // } - App.updateTestRecord(0, list, index, item, rawRspStr == null ? null : JSON.parse(rawRspStr), isRandom, true, App.currentAccountIndex, isCross) + App.updateTestRecord(0, list, index, item, rawRspStr == null ? null : parseJSON(rawRspStr), isRandom, true, App.currentAccountIndex, isCross) } }) @@ -11705,7 +11705,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea ) )) { setTimeout(function () { - window.open(vUrl.value + "/" + encodeURIComponent(JSON.stringify(encode(JSON.parse(vInput.value))))) + window.open(vUrl.value + "/" + encodeURIComponent(JSON.stringify(encode(parseJSON(vInput.value))))) }, 2000) } }, Math.max(2000, delayTime)) @@ -11732,7 +11732,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea } if (setting == null) { - setting = StringUtil.isEmpty(rawReq.setting, true) ? null : JSON.parse(StringUtil.trim(rawReq.setting, true)) + setting = StringUtil.isEmpty(rawReq.setting, true) ? null : parseJSON(StringUtil.trim(rawReq.setting, true)) } if (setting == null) { @@ -12020,13 +12020,13 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea var standardObj = null; try { var currentItem = App.isTestCaseShow ? App.remotes[App.currentDocIndex] : App.currentRemoteItem; - standardObj = JSON.parse(((currentItem || {})[isReq ? 'Document' : 'TestRecord'] || {}).standard); + standardObj = parseJSON(((currentItem || {})[isReq ? 'Document' : 'TestRecord'] || {}).standard); } catch (e3) { log(e3) } if (standardObj == null) { standardObj = JSONResponse.updateStandard({}, - isReq ? App.getRequest(vInput.value) : App.jsoncon == null ? null : JSON.parse(App.jsoncon) + isReq ? App.getRequest(vInput.value) : App.jsoncon == null ? null : parseJSON(App.jsoncon) ) } @@ -13006,7 +13006,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea if (StringUtil.isNotEmpty(rawReq.setting, true)) { var save = rawReq.save == 'true' try { - var setting = JSON.parse(StringUtil.trim(rawReq.setting, true)) || {} + var setting = parseJSON(StringUtil.trim(rawReq.setting, true)) || {} if ((setting.count != null && setting.count != App.count) || (setting.page != null && setting.page != App.page) diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/server.js b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/server.js index ba2a859..10d2fe5 100644 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/server.js +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/server.js @@ -1,6 +1,6 @@ const Koa = require('koa'); //const cors = require('koa2-cors'); -const bodyParser = require('koa-bodyparser'); +const bodyParser = require('koa-bodyparser'); // const Vue = require('vue'); const {getRequestFromURL, App} = require('./main'); // const { createBundleRenderer } = require('vue-server-renderer') @@ -168,13 +168,13 @@ app.use(async ctx => { // }) // ctx.req.addListener('end', function() { // console.log(json); - var body = ctx.body || ctx.req.body || ctx.request.body || {} // || JSON.parse(json) || {}; + var body = ctx.body || ctx.req.body || ctx.request.body || {} // || parseJSON(json) || {}; console.log(body); var isML = ctx.path == '/test/ml' || body.isML; var res = body.response; var stdd = body.standard; - var response = typeof res != 'string' ? res : (StringUtil.isEmpty(res, true) ? null : JSON.parse(res)); - var standard = typeof stdd != 'string' ? stdd : (StringUtil.isEmpty(stdd, true) ? null : JSON.parse(stdd)); + var response = typeof res != 'string' ? res : (StringUtil.isEmpty(res, true) ? null : parseJSON(res)); + var standard = typeof stdd != 'string' ? stdd : (StringUtil.isEmpty(stdd, true) ? null : parseJSON(stdd)); console.log('\n\nresponse = ' + JSON.stringify(response)); console.log('\n\nstdd = ' + JSON.stringify(stdd)); var compare = JSONResponse.compareResponse(null, standard, response || {}, '', isML, null, null, false) || {} diff --git a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/md/lib/codemirror/mode/rust/index.html b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/md/lib/codemirror/mode/rust/index.html index 407e84f..4996451 100755 --- a/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/md/lib/codemirror/mode/rust/index.html +++ b/APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/md/lib/codemirror/mode/rust/index.html @@ -29,7 +29,7 @@

        Rust mode

        ",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
        ","
        "],area:[1,"",""],param:[1,"",""],thead:[1,"","
        "],tr:[2,"","
        "],col:[2,"","
        "],td:[3,"","
        "],_default:k.htmlSerialize?[0,"",""]:[1,"X
        ","
        "]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("