From 7c3171934799022b69bdc9f494b1bf3d142e8665 Mon Sep 17 00:00:00 2001
From: Xiaoguang Sun
+
From d9dba9f140fe2420b7a4ed4e6f1985bf2f84d13c Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Wed, 20 Jan 2021 14:25:45 +0800
Subject: [PATCH 003/947] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E4=B8=AA?=
=?UTF-8?q?=E6=9D=A5=E8=87=AA=E7=9F=A5=E4=B9=8E=E7=9A=84=E8=B4=A1=E7=8C=AE?=
=?UTF-8?q?=E8=80=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CONTRIBUTING.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 656bf254a..af41fa23b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -19,6 +19,7 @@
- [CoolGeo2016](https://github.com/CoolGeo2016)
- [1906522096](https://github.com/1906522096)
- [github-ganyu](https://github.com/github-ganyu)
+- [sunxiaoguang](https://github.com/sunxiaoguang)
#### 其中特别致谢:
justinfengchen 提交的 6 个 Commits, 对 APIJSON 做出了 3,130 增加和 0 处删减(截止 2020/11/04 日);
From c479e3bfc27dddda65b699d8927568dbc76c06c2 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Thu, 21 Jan 2021 15:47:53 +0800
Subject: [PATCH 004/947] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 73b68f069..9877451d9 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ This source code is licensed under the Apache License Version 2.0
English
通用文档
视频教程
- 在线体验
+ 在线体验
From d48cbb369ca9e6c48425cbf5e301ac74a5058ec7 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Thu, 21 Jan 2021 16:31:44 +0800
Subject: [PATCH 005/947] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 9877451d9..6d9909813 100644
--- a/README.md
+++ b/README.md
@@ -276,7 +276,7 @@ https://github.com/Tencent/APIJSON/issues/187
https://github.com/Tencent/APIJSON/blob/master/Roadmap.md
理论上所有支持 SQL 与 JDBC/ODBC 的软件,都可以用本项目对接 CRUD,待测试:
-[DB2](https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.ref.doc/doc/r0059224.html), [Elasticsearch](https://www.elastic.co/cn/what-is/elasticsearch-sql), [ClickHouse](https://clickhouse.tech/docs/zh/sql-reference/syntax/), [OceanBase](https://www.oceanbase.com/docs/oceanbase/V2.2.50/ss-sr-select_daur3l), [Presto](https://prestodb.io/docs/current/admin/function-namespace-managers.html), [Spark](http://spark.apache.org/sql/), [Hive](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select)(延伸支持 Hadoop, Spark), [Phoenix](http://phoenix.apache.org/language/index.html#select)(延伸支持 HBase)
+[DB2](https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.ref.doc/doc/r0059224.html), [Elasticsearch](https://www.elastic.co/cn/what-is/elasticsearch-sql), [ClickHouse](https://clickhouse.tech/docs/zh/sql-reference/syntax/), [OceanBase](https://www.oceanbase.com/docs/oceanbase/V2.2.50/ss-sr-select_daur3l), [Presto](https://prestodb.io/docs/current/admin/function-namespace-managers.html), [Spark](http://spark.apache.org/sql/), [Hive](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select)(延伸支持 Hadoop, Spark), [Phoenix](http://phoenix.apache.org/language/index.html#select)(延伸支持 HBase), [Presto/Trino](https://prestodb.io/docs/current/sql/select.html)(延伸支持 Redis, Hive, Kafka, Elasticsearch, Thrift, Cassandra, MySQL, PostgreSQL, Oracle...)
### 我要赞赏
如果你喜欢 APIJSON,感觉 APIJSON 帮助到了你,可以点右上角 ⭐Star 支持一下,谢谢 ^_^
From bd481ba3d534b286e95413cc57c82c5a5c2b172e Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Thu, 21 Jan 2021 16:35:13 +0800
Subject: [PATCH 006/947] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 6d9909813..9c74aad60 100644
--- a/README.md
+++ b/README.md
@@ -276,7 +276,7 @@ https://github.com/Tencent/APIJSON/issues/187
https://github.com/Tencent/APIJSON/blob/master/Roadmap.md
理论上所有支持 SQL 与 JDBC/ODBC 的软件,都可以用本项目对接 CRUD,待测试:
-[DB2](https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.ref.doc/doc/r0059224.html), [Elasticsearch](https://www.elastic.co/cn/what-is/elasticsearch-sql), [ClickHouse](https://clickhouse.tech/docs/zh/sql-reference/syntax/), [OceanBase](https://www.oceanbase.com/docs/oceanbase/V2.2.50/ss-sr-select_daur3l), [Presto](https://prestodb.io/docs/current/admin/function-namespace-managers.html), [Spark](http://spark.apache.org/sql/), [Hive](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select)(延伸支持 Hadoop, Spark), [Phoenix](http://phoenix.apache.org/language/index.html#select)(延伸支持 HBase), [Presto/Trino](https://prestodb.io/docs/current/sql/select.html)(延伸支持 Redis, Hive, Kafka, Elasticsearch, Thrift, Cassandra, MySQL, PostgreSQL, Oracle...)
+[DB2](https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.ref.doc/doc/r0059224.html), [Elasticsearch](https://www.elastic.co/cn/what-is/elasticsearch-sql), [ClickHouse](https://clickhouse.tech/docs/zh/sql-reference/syntax/), [OceanBase](https://www.oceanbase.com/docs/oceanbase/V2.2.50/ss-sr-select_daur3l), [Presto](https://prestodb.io/docs/current/admin/function-namespace-managers.html), [Spark](http://spark.apache.org/sql/), [Hive](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select)(延伸支持 Hadoop, Spark), [Phoenix](http://phoenix.apache.org/language/index.html#select)(延伸支持 HBase), [Presto/Trino](https://prestodb.io/docs/current/sql/select.html)(延伸支持 Redis, Hive, Kafka, Elasticsearch, Thrift, Cassandra, MySQL, PostgreSQL, Oracle, MongoDB...)
### 我要赞赏
如果你喜欢 APIJSON,感觉 APIJSON 帮助到了你,可以点右上角 ⭐Star 支持一下,谢谢 ^_^
From 9d0345929cbfc6281034c112fde409da2de2c85f Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Fri, 22 Jan 2021 17:32:21 +0800
Subject: [PATCH 007/947] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E5=8F=91=E7=9A=84=E5=8D=9A=E5=AE=A2=20apijson=E7=AE=80?=
=?UTF-8?q?=E5=8D=95=E4=BD=BF=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 9c74aad60..ed49bc291 100644
--- a/README.md
+++ b/README.md
@@ -311,6 +311,8 @@ https://github.com/Tencent/APIJSON/blob/master/CONTRIBUTING.md
[APIJSON对接分布式HTAP数据库TiDB](https://asktug.com/t/htap-tidb/395)
+[apijson简单使用](https://www.cnblogs.com/greyzeng/p/14311995.html)
+
[APIJSON简单部署和使用](https://blog.csdn.net/m450744192/article/details/108462611)
[学习自动化接口APIJSON](https://www.jianshu.com/p/981a2a630c7b)
From 41b625b8b53ec01ae9e84b57aec8e67efae5c9a5 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Sat, 23 Jan 2021 14:54:13 +0800
Subject: [PATCH 008/947] Update README.md
---
README.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/README.md b/README.md
index ed49bc291..32f2b7253 100644
--- a/README.md
+++ b/README.md
@@ -268,6 +268,11 @@ https://github.com/Tencent/APIJSON/issues/187
+还有为 APIJSON 扫描代码贡献 Bug 的 奇安信代码卫士 和 源伞科技
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Here we replace the simple "+" way of concatenating with Stringbuilder 's append
*/ public static String getString(Object[] array, String split, boolean ignoreEmptyItem) { StringBuilder s = new StringBuilder(""); @@ -530,10 +532,13 @@ public static String getNumber(CharSequence cs) { public static String getNumber(String s) { return getNumber(s, false); } + + //CS304 Issue link: https://github.com/Tencent/APIJSON/issues/182 /**去掉string内所有非数字类型字符 - * @param s + * @param s -string passed in * @param onlyStart 中间有非数字时只获取前面的数字 - * @return + * @return limit String + *Here we replace the simple "+" way of concatenating with Stringbuilder 's append
*/ public static String getNumber(String s, boolean onlyStart) { if (isNotEmpty(s, true) == false) { @@ -631,10 +636,12 @@ public static String getCorrectEmail(String email) { public static String getPrice(String price) { return getPrice(price, PRICE_FORMAT_DEFAULT); } + //CS304 Issue link: https://github.com/Tencent/APIJSON/issues/182 /**获取价格,保留两位小数 - * @param price + * @param price -price passed in * @param formatType 添加单位(元) - * @return + * @return limit String + *Here we replace the simple "+" way of concatenating with Stringbuilder 's append
*/ public static String getPrice(String price, int formatType) { if (isNotEmpty(price, true) == false) { diff --git a/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java b/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java index 98052f7ee..3684c9dce 100755 --- a/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java +++ b/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java @@ -1375,9 +1375,11 @@ public synchronized void putQueryResult(String path, Object result) { queryResultMap.put(path, result); // } } + //CS304 Issue link: https://github.com/Tencent/APIJSON/issues/48 /**根据路径获取值 - * @param valuePath + * @param valuePath -the path need to get value * @return parent == null ? valuePath : parent.get(keys[keys.length - 1]) + *use entrySet+getValue() to replace keySet+get() to enhance efficiency
*/ @Override public Object getValueByPath(String valuePath) { diff --git a/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java b/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java index 81acbf455..51152f81f 100755 --- a/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java +++ b/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java @@ -1329,10 +1329,12 @@ public AbstractSQLConfig setCombine(Mapuse entrySet+getValue() to replace keySet+get() to enhance efficiency
*/ @JSONField(serialize = false) @Override @@ -2273,11 +2275,13 @@ public static JSONArray newJSONArray(Object obj) { public String getSetString() throws Exception { return getSetString(getMethod(), getContent(), ! isTest()); } + //CS304 Issue link: https://github.com/Tencent/APIJSON/issues/48 /**获取SET - * @param method - * @param content + * @param method -the method used + * @param content -the content map * @return - * @throws Exception + * @throws Exception + *use entrySet+getValue() to replace keySet+get() to enhance efficiency
*/ @JSONField(serialize = false) public String getSetString(RequestMethod method, Map🏆 码云最有价值开源项目
🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构!
🏆 腾讯内外四个奖项、腾讯开源五个第一
🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构!
🏆 腾讯内外四个奖项、腾讯开源五个第一 🏆 腾讯内外五个奖项、腾讯开源五个第一
🏆 腾讯内外五个奖项、腾讯开源五个第一 零代码、热更新、自动化 ORM 库
🏆Gitee Most Valuable Project 🚀A JSON Transmission Protocol and an ORM Library for providing APIs and Documents automatically.
From 3b419c231b8d20dc367d83b27d85b90a2db146d0 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 13:03:29 +0800
Subject: [PATCH 124/947] Update README-English.md
---
README-English.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README-English.md b/README-English.md
index 596b7c11c..9ed377326 100644
--- a/README-English.md
+++ b/README-English.md
@@ -6,7 +6,7 @@ This source code is licensed under the Apache License Version 2.0 🚀A JSON Transmission Protocol and an ORM Library for providing APIs and Documents automatically. 🚀 A JSON Transmission Protocol and an ORM Library for providing APIs and Documents automatically.
From 575f58b9cbf98ac7ef19f8cb81a042bc028e2b83 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 13:11:17 +0800
Subject: [PATCH 125/947] Update README.md
---
README.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 507121400..87a109268 100644
--- a/README.md
+++ b/README.md
@@ -139,11 +139,11 @@ https://www.bilibili.com/video/BV1Tv411t74v
前后端 关于接口的 开发、文档、联调 等 10 大痛点解析 零代码、热更新、自动化 ORM 库 零代码、热更新、自动化 ORM 库
use entrySet+getValue() to replace keySet+get() to enhance efficiency use entrySet+getValue() to replace keySet+get() to enhance efficiency use entrySet+getValue() to replace keySet+get() to enhance efficiency use entrySet+getValue() to replace keySet+get() to enhance efficiency
From 2162ac6b5a1787b11382fbee97d327bcffaf0865 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Wed, 28 Apr 2021 11:35:04 +0800
Subject: [PATCH 105/947] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8C=85=E6=8B=AC?=
=?UTF-8?q?=E6=9D=A5=E8=87=AA=20SUSTech=20=E5=9C=A8=E5=86=85=E7=9A=84=204?=
=?UTF-8?q?=20=E4=B8=AA=E8=B4=A1=E7=8C=AE=E8=80=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/Tencent/APIJSON#%E8%B4%A1%E7%8C%AE%E8%80%85%E4%BB%AC
---
README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/README.md b/README.md
index 07cc655db..13c64d960 100644
--- a/README.md
+++ b/README.md
@@ -240,6 +240,7 @@ https://github.com/Tencent/APIJSON/issues/187
height="54" width="54" >
+
@@ -249,6 +250,8 @@ https://github.com/Tencent/APIJSON/issues/187
+
+
From 905fb1139ff5bea868dbb6049982653f169e6566 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Wed, 28 Apr 2021 11:41:40 +0800
Subject: [PATCH 106/947] =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=E5=90=8D?=
=?UTF-8?q?=E5=8D=95=E6=96=B0=E5=A2=9E=E5=8C=85=E6=8B=AC=E6=9D=A5=E8=87=AA?=
=?UTF-8?q?=20=E8=85=BE=E8=AE=AF=E3=80=81SUSTech=20=E7=9A=84=204=20?=
=?UTF-8?q?=E4=BA=BA=EF=BC=8C=E9=9D=9E=E5=B8=B8=E6=84=9F=E8=B0=A2=E5=A4=A7?=
=?UTF-8?q?=E5=AE=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/Tencent/APIJSON/edit/master/CONTRIBUTING.md
---
CONTRIBUTING.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a6bef6ca7..011ee9502 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -7,6 +7,7 @@
非常感谢以下贡献者们对于 APIJSON 的做出的贡献:
+- [TommyLemon](https://github.com/TommyLemon)(腾讯工程师)
- [ruoranw](https://github.com/ruoranw)(现居美国洛杉矶)
- [zhoulingfengofcd](https://github.com/zhoulingfengofcd)
- [Zerounary](https://github.com/Zerounary)
@@ -23,6 +24,9 @@
- [sunxiaoguang](https://github.com/sunxiaoguang)(知乎基础研发架构师)
- [403f](https://github.com/403f)
- [gujiachun](https://github.com/gujiachun)
+- [gdjs2](https://github.com/gdjs2)
+- [Rkyzzy](https://github.com/Rkyzzy)(SUSTech)
+- [kxlv2000](https://github.com/kxlv2000)(SUSTech)
#### 其中特别致谢:
justinfengchen 提交的 6 个 Commits, 对 APIJSON 做出了 3,130 增加和 0 处删减(截止 2020/11/04 日);
From 95932f7687dbfb7b2b4e3166621805fc5020ce01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A1=BE=E5=8A=A0=E6=98=A5?=
APIJSON
-
🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构!
🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构!
From 6a0871ffea25fe9ca848c0bd4d171d76185343a7 Mon Sep 17 00:00:00 2001
From: smallhowcao
The type of Object is decided by *key*. Types can be Number, String, JSONArray. Froms are 82001,"apijson",["url0","url1"] respectively. It’s only applicable to PUT request.| "praiseUserIdList+":[82001]. In SQL, it's
`json_insert(praiseUserIdList,82001)`.
Add an *id* that praised the Moment.
Delete / decrease an item | `"Key-":Object`
It’s the contrary of "key+" | "balance-":100.00. In SQL, it's
`balance = balance - 100.00`,
meaning there's 100 less in balance.
Operations | &, \|, !
They're used in logic operations. It’s the same as AND, OR, NOT in SQL respectively.
By default, for the same key, it’s ‘\|’ (OR)operation among conditions; for different keys, the default operation among conditions is ‘&’(AND).
| ① ["id&{}":">80000,<=90000"](http://apijson.cn:8080/head/{"User":{"id&{}":">80000,<=90000"}})
In SQL, it's
`id>80000 AND id<=90000`,
meaning *id* needs to be id>80000 & id<=90000
② ["id\|{}":">90000,<=80000"](http://apijson.cn:8080/head/{"User":{"id\|{}":">90000,<=80000"}})
It's the same as "id{}":">90000,<=80000".
In SQL, it's
`id>80000 OR id<=90000`,
meaning that *id* needs to be id>90000 \| id<=80000
③ ["id!{}":[82001,38710]](http://apijson.cn:8080/head/{"User":{"id!{}":[82001,38710]}})
In SQL, it's
`id NOT IN(82001,38710)`,
meaning id needs to be ! (id=82001 \| id=38710).
- Keywords in an Array: It can be self-defined. | As for `"key":Object`, *key* is the keyword of *{}* in *"[]":{}*. The type of *Object* is up to *key*.
① `"count":Integer` It's used to count the number. The default largest number is 100.
② `"page":Integer` It’s used for getting data from which page, starting from 0. The default largest number is 100. It’s usually used with COUNT.
③ `"query":Integer` Get the number of items that match conditions
When to get the object, the integer should be 0; when to get the total number, it’s 1; when both above, it’s 2.
You can get the total number with keyword total. It can be referred to other values.
Eg.
`"total@":"/[]/total"`
Put it as the same level of query.
*Query* and *total* are used in GET requests just for convenience. Generally, HEAD request is for getting numbers like the total number.
④ `"join":"&/Table0/key0@,Join tables:
"\<" - LEFT JOIN
">" - RIGHT JOIN
"&" - INNER JOIN
"\|" - FULL JOIN
"!" - OUTTER JOIN
"@" - APP JOIN
Where @ APP JOIN is in application layer.It’ll get all the keys in tables that refKeys in result tables are referred to, like refKeys:[value0, value1….]. Then, as the results get data according to `key=$refKey` a number of times (COUNT), it uses key `IN($refKeys)` to put these counts together in just one SQL query, in order to improve the performance.
Other JOIN functions are the same as those in SQL.
`"join":"`"MainTable":{},`
`"ViceTable":{"key@":"/MainTable/refKey"}`
will return
`MainTable LEFT JOIN ViceTable`
`ON ViceTable.key=MainTable.refKey`
⑤ `"otherKey":Object` Self-defined keyword other than those that already in the system. It also returns with self-defined keywords.| ① Get User arrays with maximum of 5:
["count":5](http://apijson.cn:8080/get/{"[]":{"count":5,"User":{}}})
② Look into User arrays on page 3. Show 5 of them each page.
["count":5,
"page":3](http://apijson.cn:8080/get/{"[]":{"count":5,"page":3,"User":{}}})
③ Get User Arrays and count the total number of Users:
["[]":{
"query":2,
"User":{}
},
"total@":"/[]/total"](http://apijson.cn:8080/get/{"[]":{"query":2,"count":5,"User":{}},"total@":"%252F[]%252Ftotal"})
Questions like total page numbers or if there's next page can be solved by total,count,page functions,
Total page number:
`int totalPage = Math.ceil(total / count)`
If this is the last page:
`boolean hasNextPage = total > count*page`
If this is the first page:
`boolean isFirstPage = page <= 0`
If it's the last page:
`boolean isLastPage = total <= count*page`
...
④ Moment INNER JOIN User LEFT JOIN Comment:
["[]":{
"join": "&/User/id@,\ "Moment":{},
"User":{
"name~":"t",
"id@": "/Moment/userId"
},
"Comment":{
"momentId@": "/Moment/id"
}
}](http://apijson.cn:8080/get/{"[]":{"count":5,"join":"&%252FUser%252Fid@,\<%252FComment%252FmomentId@","Moment":{"@column":"id,userId,content"},"User":{"name~":"t","id@":"%252FMoment%252FuserId","@column":"id,name,head"},"Comment":{"momentId@":"%252FMoment%252Fid","@column":"id,momentId,content"}}})
⑤ Add the current user to every level:
["User":{},
"[]":{
"name@":"User/name", //self-defined keyword
"Moment":{}
}](http://apijson.cn:8080/get/{"User":{},"[]":{"name@":"User%252Fname","Moment":{}}})
+ Keywords in an Array: It can be self-defined. | As for `"key":Object`, *key* is the keyword of *{}* in *"[]":{}*. The type of *Object* is up to *key*.
① `"count":Integer` It's used to count the number. The default largest number is 100.
② `"page":Integer` It’s used for getting data from which page, starting from 0. The default largest number is 100. It’s usually used with COUNT.
③ `"query":Integer` Get the number of items that match conditions
When to get the object, the integer should be 0; when to get the total number, it’s 1; when both above, it’s 2.
You can get the total number with keyword total. It can be referred to other values.
Eg.
`"total@":"/[]/total"`
Put it as the same level of query.
*Query* and *total* are used in GET requests just for convenience. Generally, HEAD request is for getting numbers like the total number.
④ `"join":"&/Table0/key0@,Join tables:
"\<" - LEFT JOIN
">" - RIGHT JOIN
"&" - INNER JOIN
"\|" - FULL JOIN
"!" - OUTER JOIN
"@" - APP JOIN
Where @ APP JOIN is in application layer.It’ll get all the keys in tables that refKeys in result tables are referred to, like refKeys:[value0, value1….]. Then, as the results get data according to `key=$refKey` a number of times (COUNT), it uses key `IN($refKeys)` to put these counts together in just one SQL query, in order to improve the performance.
Other JOIN functions are the same as those in SQL.
`"join":"`"MainTable":{},`
`"ViceTable":{"key@":"/MainTable/refKey"}`
will return
`MainTable LEFT JOIN ViceTable`
`ON ViceTable.key=MainTable.refKey`
⑤ `"otherKey":Object` Self-defined keyword other than those that already in the system. It also returns with self-defined keywords.| ① Get User arrays with maximum of 5:
["count":5](http://apijson.cn:8080/get/{"[]":{"count":5,"User":{}}})
② Look into User arrays on page 3. Show 5 of them each page.
["count":5,
"page":3](http://apijson.cn:8080/get/{"[]":{"count":5,"page":3,"User":{}}})
③ Get User Arrays and count the total number of Users:
["[]":{
"query":2,
"User":{}
},
"total@":"/[]/total"](http://apijson.cn:8080/get/{"[]":{"query":2,"count":5,"User":{}},"total@":"%252F[]%252Ftotal"})
Questions like total page numbers or if there's next page can be solved by total,count,page functions,
Total page number:
`int totalPage = Math.ceil(total / count)`
If this is the last page:
`boolean hasNextPage = total > count*page`
If this is the first page:
`boolean isFirstPage = page <= 0`
If it's the last page:
`boolean isLastPage = total <= count*page`
...
④ Moment INNER JOIN User LEFT JOIN Comment:
["[]":{
"join": "&/User/id@,\ "Moment":{},
"User":{
"name~":"t",
"id@": "/Moment/userId"
},
"Comment":{
"momentId@": "/Moment/id"
}
}](http://apijson.cn:8080/get/{"[]":{"count":5,"join":"&%252FUser%252Fid@,\<%252FComment%252FmomentId@","Moment":{"@column":"id,userId,content"},"User":{"name~":"t","id@":"%252FMoment%252FuserId","@column":"id,name,head"},"Comment":{"momentId@":"%252FMoment%252Fid","@column":"id,momentId,content"}}})
⑤ Add the current user to every level:
["User":{},
"[]":{
"name@":"User/name", //self-defined keyword
"Moment":{}
}](http://apijson.cn:8080/get/{"User":{},"[]":{"name@":"User%252Fname","Moment":{}}})
Keywords in Objects: It can be self-defined. | `"@key":Object` @key is the keyword of {} in Table:{}. The type of Object is decided by @key
① `"@combine":"&key0,&key1,\|key2,key3,`
`!key4,!key5,&key6,key7..."`
First, it’ll group data with same operators. Within one group, it operates from left to right. Then it’ll follow the order of & \| ! to do the operation. Different groups are connected with &. So the expression above will be :
(key0 & key1 & key6 & other key) & (key2 \| key3 \| key7) & !(key4 \| key5)
\| is optional.
② `"@column":"column;function(arg)..."` Return with specific columns.
③ `"@order":"column0+,column1-..."` Decide the order of returning results:
④ `"@group":"column0,column1..."` How to group data. If @column has declared Table id, this id need to be included in @group. In other situations, at least one of the following needs to be done:
1.Group id is declared in @column
2.Primary Key of the table is declared in @group.
⑤ `@having":"function0(...)?value0;function1(...)?value1;function2(...)?value2..."` Add conditions on return results with @having. Usually working with@group, it’s declared in @column.
⑥ `"@schema":"sys"` Can be set as default setting.
⑦ `"@database":"POSTGRESQL"` Get data from a different database.Can be set as default setting.
⑧ `"@role":"OWNER"` Get information of the user, including
UNKNOWN,LOGIN,CONTACT,CIRCLE,OWNER,ADMIN,
Can be set as default setting.
You can self-define a new role or rewrite a role. Use`Verifier.verify` etc. to self-define validation methods.
⑨ `"@explain":true` Profiling. Can be set as default setting.
⑩ `"@otherKey":Object` Self-define keyword | ① Search *Users* that *name* or *tag* contains the letter "a":
["name~":"a",
"tag~":"a",
"@combine":"name~,tag~"](http://apijson.cn:8080/get/{"User[]":{"count":10,"User":{"@column":"id,name,tag","name~":"a","tag~":"a","@combine":"name~,tag~"}}})
② Only search column id,sex,name and return with the same order:
["@column":"id,sex,name"](http://apijson.cn:8080/get/{"User":{"@column":"id,sex,name","id":38710}})
③ Search Users that have descending order of name and default order of id:
["@order":"name-,id"](http://apijson.cn:8080/get/{"[]":{"count":10,"User":{"@column":"name,id","@order":"name-,id"}}})
④ Search Moment grouped with userId:
["@group":"userId,id"](http://apijson.cn:8080/get/{"[]":{"count":10,"Moment":%7B"@column":"userId,id","@group":"userId,id"}}})
⑤ Search Moments that id equals or less than 100 and group with userId:
["@column":"userId;max(id)",
"@group":"userId",
"@having":"max(id)>=100"](http://apijson.cn:8080/get/{"[]":{"count":10,"Moment":{"@column":"userId%253Bmax(id)","@group":"userId","@having":"max(id)>=100"}}})
You can also define the name of the returned function:
["@column":"userId;max(id):maxId",
"@group":"userId",
"@having":"maxId>=100"](http://apijson.cn:8080/get/{"[]":{"count":10,"Moment":{"@column":"userId%253Bmax(id):maxId","@group":"userId","@having":"maxId>=100"}}})
⑥ Check Users table in sys:
["@schema":"sys"](http://apijson.cn:8080/get/{"User":{"@schema":"sys"}})
⑦ Check Users table in PostgreSQL:
["@database":"POSTGRESQL"](http://apijson.cn:8080/get/{"User":{"@database":"POSTGRESQL"}})
⑧ Check the current user's activity:
["@role":"OWNER"](http://apijson.cn:8080/get/{"[]":{"Moment":{"@role":"OWNER"}}})
⑨ Turn on profiling:
["@explain":true](http://apijson.cn:8080/get/{"[]":{"Moment":{"@explain":true}}})
⑩ Get the No.0 picture from pictureList:
["@position":0, //self-defined keyword
"firstPicture()":"getFromArray(pictureList,@position)"](http://apijson.cn:8080/get/{"User":{"id":38710,"@position":0,"firstPicture()":"getFromArray(pictureList,@position)"}})
diff --git a/Document.md b/Document.md
index c7e7be53c..d1fd5dbce 100644
--- a/Document.md
+++ b/Document.md
@@ -370,7 +370,7 @@ DELETE:
删除数据 | base_url/delete/ | {
TableName:{<
减少 或 去除 | "key-":Object,与"key+"相反 | "balance-":100.00,对应SQL是`balance = balance - 100.00`,余额减少100.00,即花费了100元
比较运算 | >, <, >=, <= 比较运算符,用于
① 提供 "id{}":"<=90000" 这种条件范围的简化写法
② 实现子查询相关比较运算
不支持 "key=":Object 和 "key!=":Object 这两种写法,直接用更简单的 "key":Object 和 "key!":Object 替代。 | ① ["id<=":90000](http://apijson.cn:8080/get/{"[]":{"User":{"id<=":90000}}}),对应SQL是`id<=90000`,查询符合id<=90000的一个User数组
② ["id>@":{
"from":"Comment",
"Comment":{
"@column":"min(userId)"
}
}](http://apijson.cn:8080/get/{"User":{"id>@":{"from":"Comment","Comment":{"@column":"min(userId)"}}}})
WHERE id>(SELECT min(userId) FROM Comment)
逻辑运算 | &, \|, ! 逻辑运算符,对应数据库 SQL 中的 AND, OR, NOT。
横或纵与:同一键值对的值内条件默认 \| 或连接,可以在 key 后加逻辑运算符来具体指定;不同键值对的条件默认 & 与连接,可以用下面说明的对象关键词 @combine 来具体指定。
① & 可用于"key&{}":"条件"等
② \| 可用于"key\|{}":"条件", "key\|{}":[]等,一般可省略
③ ! 可单独使用,如"key!":Object,也可像&,\|一样配合其他功能符使用
"key!":null 无效,null 值会导致整个键值对被忽略解析,可以用 "key{}":"!=null" 替代,
"key":null 同理,用 "key{}":"=null" 替代。 | ① ["id&{}":">80000,<=90000"](http://apijson.cn:8080/head/{"User":{"id&{}":">80000,<=90000"}}),对应SQL是`id>80000 AND id<=90000`,即id满足id>80000 & id<=90000
② ["id\|{}":">90000,<=80000"](http://apijson.cn:8080/head/{"User":{"id\|{}":">90000,<=80000"}}),同"id{}":">90000,<=80000",对应SQL是`id>80000 OR id<=90000`,即id满足id>90000 \| id<=80000
③ ["id!{}":[82001,38710]](http://apijson.cn:8080/head/{"User":{"id!{}":[82001,38710]}}),对应SQL是`id NOT IN(82001,38710)`,即id满足 ! (id=82001 \| id=38710),可过滤黑名单的消息
- 数组关键词,可自定义 | "key":Object,key为 "[]":{} 中{}内的关键词,Object的类型由key指定
① "count":Integer,查询数量,0 表示最大值,默认最大值为100
② "page":Integer,查询页码,从0开始,默认最大值为100,一般和count一起用
③ "query":Integer,查询内容
0-对象,1-总数和分页详情,2-以上全部
总数关键词为 total,分页详情关键词为 info,
它们都和 query 同级,通过引用赋值得到,例如
"total@":"/[]/total", "info@":"/[]/info"
这里query及total仅为GET类型的请求提供方便,
一般可直接用HEAD类型的请求获取总数
④ "join":"&/Table0/key0@,\多表连接方式:
"\<" - LEFT JOIN
">" - RIGHT JOIN
"&" - INNER JOIN
"\|" - FULL JOIN
"!" - OUTTER JOIN
"@" - APP JOIN
其中 @ APP JOIN 为应用层连表,会从已查出的主表里取得所有副表 key@ 关联的主表内的 refKey 作为一个数组 refKeys: [value0, value1...],然后把原来副表 count 次查询 key=$refKey 的 SQL 用 key IN($refKeys) 的方式合并为一条 SQL 来优化性能;
其它 JOIN 都是 SQL JOIN,具体功能和 MySQL,PostgreSQL 等数据库的 JOIN 一一对应
`"join":"`"MainTable":{},`
`"ViceTable":{"key@":"/MainTable/refKey"}`
会对应生成
`MainTable LEFT JOIN ViceTable`
`ON ViceTable.key=MainTable.refKey`
⑤ "otherKey":Object,自定义关键词,名称和以上系统关键词不一样,且原样返回上传的值 | ① 查询User数组,最多5个:
["count":5](http://apijson.cn:8080/get/{"[]":{"count":5,"User":{}}})
对应SQL是`LIMIT 5`
② 查询第3页的User数组,每页5个:
["count":5,
"page":3](http://apijson.cn:8080/get/{"[]":{"count":5,"page":3,"User":{}}})
对应SQL是`LIMIT 5 OFFSET 15`
③ 查询User数组和对应的User总数:
["[]":{
"query":2,
"User":{}
},
"total@":"/[]/total",
"info@":"/[]/info"](http://apijson.cn:8080/get/{"[]":{"query":2,"count":5,"User":{}},"total@":"%252F[]%252Ftotal","info@":"%252F[]%252Finfo"})
返回的数据中,总数及分页详情结构为:
"total":139, //总数
"info":{ //分页详情
"total":139, //总数
"count":5, //每页数量
"page":0, //当前页码
"max":27, //最大页码
"more":true, //是否还有更多
"first":true, //是否为首页
"last":false //是否为尾页
}
④ Moment INNER JOIN User LEFT JOIN Comment:
["[]":{
"join":"&/User/id@,\ "Moment":{
"@group":"id" //主副表不是一对一,要去除重复数据
},
"User":{
"name~":"t",
"id@":"/Moment/userId"
},
"Comment":{
"momentId@":"/Moment/id"
}
}](http://apijson.cn:8080/get/{"[]":{"count":5,"join":"&%252FUser%252Fid@,\<%252FComment%252FmomentId@","Moment":{"@column":"id,userId,content","@group":"id"},"User":{"name~":"t","id@":"%252FMoment%252FuserId","@column":"id,name,head"},"Comment":{"momentId@":"%252FMoment%252Fid","@column":"id,momentId,content"}}})
⑤ 每一层都加当前用户名:
["User":{},
"[]":{
"name@":"User/name", //自定义关键词
"Moment":{}
}](http://apijson.cn:8080/get/{"User":{},"[]":{"name@":"User%252Fname","Moment":{}}})
+ 数组关键词,可自定义 | "key":Object,key为 "[]":{} 中{}内的关键词,Object的类型由key指定
① "count":Integer,查询数量,0 表示最大值,默认最大值为100
② "page":Integer,查询页码,从0开始,默认最大值为100,一般和count一起用
③ "query":Integer,查询内容
0-对象,1-总数和分页详情,2-以上全部
总数关键词为 total,分页详情关键词为 info,
它们都和 query 同级,通过引用赋值得到,例如
"total@":"/[]/total", "info@":"/[]/info"
这里query及total仅为GET类型的请求提供方便,
一般可直接用HEAD类型的请求获取总数
④ "join":"&/Table0/key0@,\多表连接方式:
"\<" - LEFT JOIN
">" - RIGHT JOIN
"&" - INNER JOIN
"\|" - FULL JOIN
"!" - OUTER JOIN
"@" - APP JOIN
其中 @ APP JOIN 为应用层连表,会从已查出的主表里取得所有副表 key@ 关联的主表内的 refKey 作为一个数组 refKeys: [value0, value1...],然后把原来副表 count 次查询 key=$refKey 的 SQL 用 key IN($refKeys) 的方式合并为一条 SQL 来优化性能;
其它 JOIN 都是 SQL JOIN,具体功能和 MySQL,PostgreSQL 等数据库的 JOIN 一一对应
`"join":"`"MainTable":{},`
`"ViceTable":{"key@":"/MainTable/refKey"}`
会对应生成
`MainTable LEFT JOIN ViceTable`
`ON ViceTable.key=MainTable.refKey`
⑤ "otherKey":Object,自定义关键词,名称和以上系统关键词不一样,且原样返回上传的值 | ① 查询User数组,最多5个:
["count":5](http://apijson.cn:8080/get/{"[]":{"count":5,"User":{}}})
对应SQL是`LIMIT 5`
② 查询第3页的User数组,每页5个:
["count":5,
"page":3](http://apijson.cn:8080/get/{"[]":{"count":5,"page":3,"User":{}}})
对应SQL是`LIMIT 5 OFFSET 15`
③ 查询User数组和对应的User总数:
["[]":{
"query":2,
"User":{}
},
"total@":"/[]/total",
"info@":"/[]/info"](http://apijson.cn:8080/get/{"[]":{"query":2,"count":5,"User":{}},"total@":"%252F[]%252Ftotal","info@":"%252F[]%252Finfo"})
返回的数据中,总数及分页详情结构为:
"total":139, //总数
"info":{ //分页详情
"total":139, //总数
"count":5, //每页数量
"page":0, //当前页码
"max":27, //最大页码
"more":true, //是否还有更多
"first":true, //是否为首页
"last":false //是否为尾页
}
④ Moment INNER JOIN User LEFT JOIN Comment:
["[]":{
"join":"&/User/id@,\ "Moment":{
"@group":"id" //主副表不是一对一,要去除重复数据
},
"User":{
"name~":"t",
"id@":"/Moment/userId"
},
"Comment":{
"momentId@":"/Moment/id"
}
}](http://apijson.cn:8080/get/{"[]":{"count":5,"join":"&%252FUser%252Fid@,\<%252FComment%252FmomentId@","Moment":{"@column":"id,userId,content","@group":"id"},"User":{"name~":"t","id@":"%252FMoment%252FuserId","@column":"id,name,head"},"Comment":{"momentId@":"%252FMoment%252Fid","@column":"id,momentId,content"}}})
⑤ 每一层都加当前用户名:
["User":{},
"[]":{
"name@":"User/name", //自定义关键词
"Moment":{}
}](http://apijson.cn:8080/get/{"User":{},"[]":{"name@":"User%252Fname","Moment":{}}})
对象关键词,可自定义 | "@key":Object,@key为 Table:{} 中{}内的关键词,Object的类型由@key指定
① "@combine":"&key0,&key1,\|key2,key3,
!key4,!key5,&key6,key7...",条件组合方式,\| 可省略。会自动把同类的合并,外层按照 & \| ! 顺序,内层的按传参顺序组合成
(key0 & key1 & key6 & 其它key) & (key2 \| key3 \| key7) & !(key4 \| key5)
这种连接方式,其中 "其它key" 是指与 @combine 在同一对象,且未被它声明的条件 key,默认都是 & 连接
② "@column":"column;function(arg)...",返回字段
③ "@order":"column0+,column1-...",排序方式
④ "@group":"column0,column1...",分组方式。如果@column里声明了Table的id,则id也必须在@group中声明;其它情况下必须满足至少一个条件:
1.分组的key在@column里声明
2.Table主键在@group中声明
⑤ "@having":"function0(...)?value0;function1(...)?value1;function2(...)?value2...",SQL函数条件,一般和@group一起用,函数一般在@column里声明
⑥ "@schema":"sys",集合空间(模式),非默认的值可通过它来指定,可以在最外层作为全局默认配置
⑦ "@database":"POSTGRESQL",跨数据库,非默认的值可通过它来指定,可以在最外层作为全局默认配置
⑧ "@json":"key0,key1...",转为 JSON 格式返回,符合 JSONObject 则转为 {...},符合 JSONArray 则转为 \[...]
⑨ "@role":"OWNER",来访角色,包括
UNKNOWN,LOGIN,CONTACT,CIRCLE,OWNER,ADMIN,
可以在最外层作为全局默认配置,
可自定义其它角色并重写 Verifier.verify 等相关方法来自定义校验
⑩ "@explain":true,性能分析,可以在最外层作为全局默认配置
⑪ "@raw":"key0,key1...",其中 key0, key1 都对应有键值对
"key0":"SQL片段或SQL片段的别名",
"key1":"SQL片段或SQL片段的别名"
自定义原始SQL片段,可扩展嵌套SQL函数等复杂语句,必须是后端已配置的,只有其它功能符都做不到才考虑,谨慎使用,注意防SQL注入
⑫ "@otherKey":Object,自定义关键词,名称和以上系统关键词不一样,且原样返回上传的值 | ① 搜索name或tag任何一个字段包含字符a的User列表:
["name~":"a",
"tag~":"a",
"@combine":"name~,tag~"](http://apijson.cn:8080/get/{"User[]":{"count":10,"User":{"@column":"id,name,tag","name~":"a","tag~":"a","@combine":"name~,tag~"}}})
对应SQL是`name REGEXP 'a' OR tag REGEXP 'a'`
② 只查询id,sex,name这几列并且请求结果也按照这个顺序:
["@column":"id,sex,name"](http://apijson.cn:8080/get/{"User":{"@column":"id,sex,name","id":38710}})
对应SQL是`SELECT id,sex,name`
③ 查询按 name降序、id默认顺序 排序的User数组:
["@order":"name-,id"](http://apijson.cn:8080/get/{"[]":{"count":10,"User":{"@column":"name,id","@order":"name-,id"}}})
对应SQL是`ORDER BY name DESC,id`
④ 查询按userId分组的Moment数组:
["@group":"userId,id"](http://apijson.cn:8080/get/{"[]":{"count":10,"Moment":%7B"@column":"userId,id","@group":"userId,id"}}})
对应SQL是`GROUP BY userId,id`
⑤ 查询 按userId分组、id最大值>=100 的Moment数组:
["@column":"userId;max(id)",
"@group":"userId",
"@having":"max(id)>=100"](http://apijson.cn:8080/get/{"[]":{"count":10,"Moment":{"@column":"userId%253Bmax(id)","@group":"userId","@having":"max(id)>=100"}}})
对应SQL是`SELECT userId,max(id) ... GROUP BY userId HAVING max(id)>=100`
还可以指定函数返回名:
["@column":"userId;max(id):maxId",
"@group":"userId",
"@having":"maxId>=100"](http://apijson.cn:8080/get/{"[]":{"count":10,"Moment":{"@column":"userId%253Bmax(id):maxId","@group":"userId","@having":"maxId>=100"}}})
对应SQL是`SELECT userId,max(id) AS maxId ... GROUP BY userId HAVING maxId>=100`
⑥ 查询 sys 内的 User 表:
["@schema":"sys"](http://apijson.cn:8080/get/{"User":{"@schema":"sys"}})
对应SQL是`FROM sys.User`
⑦ 查询 PostgreSQL 数据库的 User 表:
["@database":"POSTGRESQL"](http://apijson.cn:8080/get/{"User":{"@database":"POSTGRESQL","@explain":true}})
⑧ 将 VARCHAR 字符串字段 get 转为 JSONArray 返回:
["@json":"get"](http://apijson.cn:8080/get/{"Access":{"@json":"get"}})
⑨ 查询当前用户的动态:
["@role":"OWNER"](http://apijson.cn:8080/get/{"[]":{"Moment":{"@role":"OWNER"}}})
⑩ 开启性能分析:
["@explain":true](http://apijson.cn:8080/get/{"[]":{"Moment":{"@explain":true}}})
对应SQL是`EXPLAIN`
⑪ 统计最近一周偶数userId的数量
["@column":"date;left(date,10):day;sum(if(userId%2=0,1,0))",
"@group":"day",
"@having":"to_days(now())-to_days(\`date\`)<=7",
"@raw":"@column,@having"](http://apijson.cn:8080/get/{"[]":{"Moment":{"@column":"date%3bleft(date,10):day%3bsum(if(userId%252=0,1,0))","@group":"day","@having":"to_days(now())-to_days(\`date\`)<=7","@raw":"@column,@having"}}})
对应SQL是``SELECT date, left(date,10) AS day, sum(if(userId%2=0,1,0)) ... GROUP BY day HAVING to_days(now())-to_days(`date`)<=7``
⑫ 从pictureList获取第0张图片:
["@position":0, //自定义关键词
"firstPicture()":"getFromArray(pictureList,@position)"](http://apijson.cn:8080/get/{"User":{"id":38710,"@position":0,"firstPicture()":"getFromArray(pictureList,@position)"}})
From 0aa7281398bf52aa71dac3dad9d447d055778c4f Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Thu, 13 May 2021 16:39:20 +0800
Subject: [PATCH 110/947] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E3=80=90=E8=85=BE?=
=?UTF-8?q?=E8=AE=AF=E7=8A=80=E7=89=9B=E9=B8=9F=E5=BC=80=E6=BA=90=E4=BA=BA?=
=?UTF-8?q?=E6=89=8D=E5=9F=B9=E5=85=BB=E8=AE=A1=E5=88=92=E3=80=91=E5=85=AC?=
=?UTF-8?q?=E5=91=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index fd6dbd232..70fc32d17 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+[【腾讯犀牛鸟开源人才培养计划】开始啦!加入我们开源共建吧~](https://github.com/Tencent/APIJSON/issues/229)
+
Tencent is pleased to support the open source community by making APIJSON available.
Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
This source code is licensed under the Apache License Version 2.0
From b3704c9f75a63f9db878519f76851eb55ec376c2 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Thu, 13 May 2021 20:07:21 +0800
Subject: [PATCH 111/947] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E4=B8=AA?=
=?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=EF=BC=8C=E6=84=9F=E8=B0=A2=E8=85=BE?=
=?UTF-8?q?=E8=AE=AF=E5=90=8C=E4=BA=8B=E7=9A=84=E8=B4=A1=E7=8C=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 70fc32d17..c178329b6 100644
--- a/README.md
+++ b/README.md
@@ -259,6 +259,7 @@ https://github.com/Tencent/APIJSON/issues/187
+
From d78967a05d8b6a51ae3f7f28266b8cd87f2cc42f Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Thu, 13 May 2021 20:08:32 +0800
Subject: [PATCH 112/947] =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=E5=90=8D?=
=?UTF-8?q?=E5=8D=95=E6=96=B0=E5=A2=9E=E8=85=BE=E8=AE=AF=E5=B7=A5=E7=A8=8B?=
=?UTF-8?q?=E5=B8=88=20caohao-php=EF=BC=8C=E6=84=9F=E8=B0=A2=E8=B4=A1?=
=?UTF-8?q?=E7=8C=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
CONTRIBUTING.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 011ee9502..ac57d8d9d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -27,6 +27,8 @@
- [gdjs2](https://github.com/gdjs2)
- [Rkyzzy](https://github.com/Rkyzzy)(SUSTech)
- [kxlv2000](https://github.com/kxlv2000)(SUSTech)
+- [caohao-php](https://github.com/caohao-php)(腾讯工程师)
+
#### 其中特别致谢:
justinfengchen 提交的 6 个 Commits, 对 APIJSON 做出了 3,130 增加和 0 处删减(截止 2020/11/04 日);
From 5750a556be3cb220848192527d6699306932e5a5 Mon Sep 17 00:00:00 2001
From: Eno Yao
+```
[Click here to test](http://apijson.cn:8080/get/{"User":{}})
Response:
-
+
+```json
{
"User":{
}
}
-
-
+```
+
+```json
{
"User":{
"id":38710,
@@ -106,13 +109,14 @@ Response:
"code":200,
"msg":"success"
}
-
#### Get an Array of Users
+
Request:
-
+```
[Click here to test](http://apijson.cn:8080/get/{"[]":{"count":3,"User":{"@column":"id,name"}}})
Response:
-
+
+```json
{
"[]":{
"count":3, //just get 3 results
@@ -121,12 +125,13 @@ Request:
}
}
}
-
+```
+
+```json
{
"[]":[
{
@@ -151,7 +156,7 @@ Response:
"code":200,
"msg":"success"
}
-
@@ -188,28 +193,28 @@ In the menu at the right, click libs, right click apijson-orm.jar,click add as l
Open apijson.demo.server.DemoSQLConfig. In line 40-61, change return values of `getDBUri`,`getDBAccount`,`getDBPassword`,`getSchema` to your own database.
-
+ return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? null : "root";
+}
+@Override
+public String getSchema() {
+ String s = super.getSchema();
+ return StringUtil.isEmpty(s, true) ? "thea" : s; //TODO: Change the return value to your own. For here,change "thea" to "your database's name"
+}
+```
**Note**: Instead of this step, you can also [import your database](#2.2).
From 3ac696efb732daf4100badabb9ce256d48632015 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Fri, 14 May 2021 18:40:50 +0800
Subject: [PATCH 114/947] =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=E4=BB=AC?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=85=BE=E8=AE=AF=20AlloyTeam=20=E7=9A=84?=
=?UTF-8?q?=E5=90=8C=E4=BA=8B=EF=BC=8C=E9=9D=9E=E5=B8=B8=E6=84=9F=E8=B0=A2?=
=?UTF-8?q?=E5=AF=B9=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3=E7=9A=84=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/Tencent/APIJSON/pull/235
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index c178329b6..a5d11536e 100644
--- a/README.md
+++ b/README.md
@@ -259,7 +259,9 @@ https://github.com/Tencent/APIJSON/issues/187
+```java
+@Override
+public String getDBUri() {
+ //TODO: Change the return value to your own
+ return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "jdbc:postgresql://localhost:5432/postgres" : "jdbc:mysql://192.168.71.146:3306/";
+}
+@Override
+public String getDBAccount() {
+ //TODO: Change the return value to your own
+ return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "postgres" : "root";
+}
@Override
- public String getDBUri() {
- //TODO: Change the return value to your own
- return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "jdbc:postgresql://localhost:5432/postgres" : "jdbc:mysql://192.168.71.146:3306/";
- }
- @Override
- public String getDBAccount() {
+public String getDBPassword() {
//TODO: Change the return value to your own
- return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? "postgres" : "root";
- }
- @Override
- public String getDBPassword() {
- //TODO: Change the return value to your own
- return DATABASE_POSTGRESQL.equalsIgnoreCase(getDatabase()) ? null : "root";
- }
- @Override
- public String getSchema() {
- String s = super.getSchema();
- return StringUtil.isEmpty(s, true) ? "thea" : s; //TODO: Change the return value to your own. For here,change "thea" to "your database's name"
- }
-
+
+
From dedd0d16b6c7c085fa1fc259df212049eb966d9f Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Fri, 14 May 2021 18:41:52 +0800
Subject: [PATCH 115/947] =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=E5=90=8D?=
=?UTF-8?q?=E5=8D=95=E6=96=B0=E5=A2=9E=E8=85=BE=E8=AE=AF=20AlloyTeam=20?=
=?UTF-8?q?=E7=9A=84=E5=90=8C=E4=BA=8B=EF=BC=8C=E9=9D=9E=E5=B8=B8=E6=84=9F?=
=?UTF-8?q?=E8=B0=A2=E5=AF=B9=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3=E7=9A=84?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/Tencent/APIJSON/pull/235
---
CONTRIBUTING.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ac57d8d9d..b20176fcb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -28,6 +28,7 @@
- [Rkyzzy](https://github.com/Rkyzzy)(SUSTech)
- [kxlv2000](https://github.com/kxlv2000)(SUSTech)
- [caohao-php](https://github.com/caohao-php)(腾讯工程师)
+- [Wscats](https://github.com/Wscats)(腾讯工程师)
#### 其中特别致谢:
From 20b16a86933fb1d616ca431f96e9e4a0bccf6958 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Sat, 15 May 2021 22:23:06 +0800
Subject: [PATCH 116/947] Update README.md
---
README.md | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index a5d11536e..edda5555d 100644
--- a/README.md
+++ b/README.md
@@ -56,11 +56,6 @@ APIJSON 是一种专为 API 而生的 JSON 网络传输协议 以及 基于这
前端再也不用和后端沟通接口或文档问题了!再也不会被文档各种错误坑了!
后端再也不用为了兼容旧接口写新版接口和文档了!再也不会被前端随时随地没完没了地烦了!
-
-
-
### 特点功能
#### 对于前端
@@ -134,13 +129,9 @@ APIJSON 是一种专为 API 而生的 JSON 网络传输协议 以及 基于这
### APIJSON 分享演讲
-https://github.com/TommyLemon/StaticResources/tree/master/APIJSON/Share/GiteeGVPMeetup2020
-https://my.oschina.net/u/4570368/blog/4818203
-https://my.oschina.net/gitosc/blog/4864607
-
-
-演讲录播视频
https://www.bilibili.com/video/BV1Tv411t74v?p=4
+
+
From 2577f02f9e741150a61a8d7df890ca03d235a825 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 00:01:20 +0800
Subject: [PATCH 117/947] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index edda5555d..c90935626 100644
--- a/README.md
+++ b/README.md
@@ -129,7 +129,7 @@ APIJSON 是一种专为 API 而生的 JSON 网络传输协议 以及 基于这
### APIJSON 分享演讲
-https://www.bilibili.com/video/BV1Tv411t74v?p=4
+https://www.bilibili.com/video/BV1Tv411t74v

From 8519c1b3d61f6c651362c8c900930a5a51d73ea6 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 11:36:36 +0800
Subject: [PATCH 118/947] Update CONTRIBUTING.md
---
CONTRIBUTING.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b20176fcb..ebef62c74 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -5,14 +5,14 @@
## Acknowledgements
-非常感谢以下贡献者们对于 APIJSON 的做出的贡献:
+非常感谢以下贡献者们对于 APIJSON 本项目做出的贡献:
- [TommyLemon](https://github.com/TommyLemon)(腾讯工程师)
- [ruoranw](https://github.com/ruoranw)(现居美国洛杉矶)
- [zhoulingfengofcd](https://github.com/zhoulingfengofcd)
-- [Zerounary](https://github.com/Zerounary)
+- [Zerounary](https://github.com/Zerounary)(还贡献了 APIJSONParser)
- [fineday009](https://github.com/fineday009)(腾讯工程师)
-- [vincentCheng](https://github.com/vincentCheng)
+- [vincentCheng](https://github.com/vincentCheng)(还贡献了 apijson-doc)
- [justinfengchen](https://github.com/justinfengchen)
- [linlwqq](https://github.com/linlwqq)
- [redcatmiss](https://github.com/redcatmiss)(社保科技工程师)
From 81632232ffcf67e22eb71b6643992b40ddb00f7f Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 11:38:31 +0800
Subject: [PATCH 119/947] Update CONTRIBUTING.md
---
CONTRIBUTING.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ebef62c74..4687648ed 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -10,9 +10,9 @@
- [TommyLemon](https://github.com/TommyLemon)(腾讯工程师)
- [ruoranw](https://github.com/ruoranw)(现居美国洛杉矶)
- [zhoulingfengofcd](https://github.com/zhoulingfengofcd)
-- [Zerounary](https://github.com/Zerounary)(还贡献了 APIJSONParser)
-- [fineday009](https://github.com/fineday009)(腾讯工程师)
-- [vincentCheng](https://github.com/vincentCheng)(还贡献了 apijson-doc)
+- [Zerounary](https://github.com/Zerounary)(还开源了 APIJSONParser)
+- [fineday009](https://github.com/fineday009)(腾讯工程师,还贡献了 apijson-framework, APIJSON-Demo)
+- [vincentCheng](https://github.com/vincentCheng)(还开源了 apijson-doc)
- [justinfengchen](https://github.com/justinfengchen)
- [linlwqq](https://github.com/linlwqq)
- [redcatmiss](https://github.com/redcatmiss)(社保科技工程师)
From 0de66738791ddb8a732b8b22d0da67b3a4fa3014 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 11:39:21 +0800
Subject: [PATCH 120/947] Update CONTRIBUTING.md
---
CONTRIBUTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4687648ed..1638d3cae 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -7,7 +7,7 @@
非常感谢以下贡献者们对于 APIJSON 本项目做出的贡献:
-- [TommyLemon](https://github.com/TommyLemon)(腾讯工程师)
+- [TommyLemon](https://github.com/TommyLemon)(腾讯工程师,还开源了 apijson-framework, APIJSON-Demo, apijson-column 等)
- [ruoranw](https://github.com/ruoranw)(现居美国洛杉矶)
- [zhoulingfengofcd](https://github.com/zhoulingfengofcd)
- [Zerounary](https://github.com/Zerounary)(还开源了 APIJSONParser)
From 6ef703230fca0b1eec22fd6786914d5bd564a17f Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 11:41:20 +0800
Subject: [PATCH 121/947] Update CONTRIBUTING.md
---
CONTRIBUTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1638d3cae..7613337a3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -8,7 +8,7 @@
非常感谢以下贡献者们对于 APIJSON 本项目做出的贡献:
- [TommyLemon](https://github.com/TommyLemon)(腾讯工程师,还开源了 apijson-framework, APIJSON-Demo, apijson-column 等)
-- [ruoranw](https://github.com/ruoranw)(现居美国洛杉矶)
+- [ruoranw](https://github.com/ruoranw)(现居美国洛杉矶,还开源了 APIJSONdocs)
- [zhoulingfengofcd](https://github.com/zhoulingfengofcd)
- [Zerounary](https://github.com/Zerounary)(还开源了 APIJSONParser)
- [fineday009](https://github.com/fineday009)(腾讯工程师,还贡献了 apijson-framework, APIJSON-Demo)
From 43da615fad71d6f6f3a6b0863958a4fc24b24f86 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 13:02:45 +0800
Subject: [PATCH 122/947] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index c90935626..507121400 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ This source code is licensed under the Apache License Version 2.0
APIJSON
-
🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构!
🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构!
From deaa91d806ab57c83da29ecba170172bd56631a8 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 13:03:15 +0800
Subject: [PATCH 123/947] Update README-English.md
---
README-English.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README-English.md b/README-English.md
index eab64c560..596b7c11c 100644
--- a/README-English.md
+++ b/README-English.md
@@ -6,7 +6,7 @@ This source code is licensed under the Apache License Version 2.0
APIJSON
-
🚀A JSON Transmission Protocol and an ORM Library for providing APIs and Documents automatically.
APIJSON
-
https://github.com/Tencent/APIJSON/wiki
-* **解决十大痛点** (APIJSON 大幅提振开发效率、强力杜绝联调扯皮、巧妙规避文档缺陷、非常节省流量带宽 等)
+* **解决十大痛点** (APIJSON 可帮助用户 提振开发效率、杜绝联调扯皮、规避文档缺陷、节省流量带宽 等)
* **开发提速巨大** (CRUD 零代码热更新自动化,APIJSONBoot 对比 SSM、SSH 等保守估计可提速 20 倍以上)
* **腾讯官方开源** (使用 GitHub、Gitee、工蜂 等平台的官方账号开源,微信公众号、腾讯云+社区 等官方公告)
-* **社区影响力大** (GitHub 10K Star 在 350W Java 项目中排名前 150,远超 FLAG, BAT 等国内外绝大部分开源项目)
-* **各项荣誉成就** (腾讯开源五个第一、腾讯首个 GVP 获奖项目、腾讯后端项目 Star 第一、GitHub Java 周榜第一 等)
+* **社区影响力大** (GitHub 1W+ Star 在 450W Java 项目中排名前 140,远超 FLAG, BAT 等国内外绝大部分开源项目)
+* **各项荣誉成就** (腾讯内三个奖项、腾讯外两个奖项、腾讯后端项目 Star 第一、登上 GitHub Java 日周月榜 等)
* **多样用户案例** (腾讯内部用户包含 互娱、音乐、云与智慧,外部用户包含 500 强上市公司、数千亿资本国企 等)
* **适用场景广泛** (社交聊天、阅读资讯、影音视频、办公学习 等各种 App、网站、公众号、小程序 等非金融类项目)
* **周边生态丰富** (Android, iOS, Web 等各种 Demo、继承 JSON 的海量生态、零代码 接口测试 和 单元测试 工具等)
@@ -152,7 +152,7 @@ https://github.com/Tencent/APIJSON/wiki
* **使用安全简单** (自动增删改查、自动生成文档、自动管理版本、自动控制权限、自动校验参数、自动防SQL注入等)
* **灵活定制业务** (在后端编写 远程函数,可以拿到 session、version、当前 JSON 对象 等,然后自定义处理)
* **高质可靠代码** (代码严谨规范,商业分析软件源伞 Pinpoint 代码扫描报告平均每行代码 Bug 率低至 0.15%)
-* **兼容各种项目** (对各类 Web 框架集成友好且提供 SpringBoot, JFinal 的 Demo,协议不限 HTTP,与其它库无冲突)
+* **兼容各种项目** (协议不限 HTTP,与其它库无冲突,对各类 Web 框架集成友好且提供 SpringBoot, JFinal 的 Demo)
* **工程轻量小巧** (仅依赖 fastjson,Jar 仅 280KB,Java 文件仅 59 个共 13719 行代码,例如 APIJSONORM 4.3.1)
* **多年持续迭代** (自 2016 年开源至今已连续维护 4 年,累计 2000+ Commits、70+ Releases,不断更新迭代中...)
From cc61ca64841184324babea280312f8d53e18947d Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 13:13:23 +0800
Subject: [PATCH 126/947] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 87a109268..8a321b8e8 100644
--- a/README.md
+++ b/README.md
@@ -130,7 +130,7 @@ APIJSON 是一种专为 API 而生的 JSON 网络传输协议 以及 基于这
### APIJSON 分享演讲
https://www.bilibili.com/video/BV1Tv411t74v
-
+
@@ -143,7 +143,7 @@ https://github.com/Tencent/APIJSON/wiki
* **开发提速巨大** (CRUD 零代码热更新自动化,APIJSONBoot 对比 SSM、SSH 等保守估计可提速 20 倍以上)
* **腾讯官方开源** (使用 GitHub、Gitee、工蜂 等平台的官方账号开源,微信公众号、腾讯云+社区 等官方公告)
* **社区影响力大** (GitHub 1W+ Star 在 450W Java 项目中排名前 140,远超 FLAG, BAT 等国内外绝大部分开源项目)
-* **各项荣誉成就** (腾讯内三个奖项、腾讯外两个奖项、腾讯后端项目 Star 第一、登上 GitHub Java 日周月榜 等)
+* **各项荣誉成就** (腾讯内三个奖项、腾讯外两个奖项、腾讯后端项目 Star 第一、多次登上 GitHub Java 日周月榜 等)
* **多样用户案例** (腾讯内部用户包含 互娱、音乐、云与智慧,外部用户包含 500 强上市公司、数千亿资本国企 等)
* **适用场景广泛** (社交聊天、阅读资讯、影音视频、办公学习 等各种 App、网站、公众号、小程序 等非金融类项目)
* **周边生态丰富** (Android, iOS, Web 等各种 Demo、继承 JSON 的海量生态、零代码 接口测试 和 单元测试 工具等)
From 1c867f761637f56d22565db6bbfca7a5477382f0 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 13:14:13 +0800
Subject: [PATCH 127/947] Update README.md
---
README.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 8a321b8e8..95fa3dc26 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ This source code is licensed under the Apache License Version 2.0
APIJSON
-
🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构!
🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构
@@ -51,10 +51,10 @@ APIJSON 是一种专为 API 而生的 JSON 网络传输协议 以及 基于这
能大幅降低开发和沟通成本,简化开发流程,缩短开发周期。
适合中小型前后端分离的项目,尤其是 BaaS、Serverless、互联网创业项目和企业自用项目。
-通过万能的 API,前端可以定制任何数据、任何结构!
-大部分 HTTP 请求后端再也不用写接口了,更不用写文档了!
-前端再也不用和后端沟通接口或文档问题了!再也不会被文档各种错误坑了!
-后端再也不用为了兼容旧接口写新版接口和文档了!再也不会被前端随时随地没完没了地烦了!
+通过万能的 API,前端可以定制任何数据、任何结构。
+大部分 HTTP 请求后端再也不用写接口了,更不用写文档了。
+前端再也不用和后端沟通接口或文档问题了。再也不会被文档各种错误坑了。
+后端再也不用为了兼容旧接口写新版接口和文档了。再也不会被前端随时随地没完没了地烦了。
### 特点功能
From 9f64a46dc7dac1160fdb67e28c4c01a33eb66c69 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 17 May 2021 14:21:24 +0800
Subject: [PATCH 128/947] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 95fa3dc26..0a969deb8 100644
--- a/README.md
+++ b/README.md
@@ -142,7 +142,7 @@ https://github.com/Tencent/APIJSON/wiki
* **解决十大痛点** (APIJSON 可帮助用户 提振开发效率、杜绝联调扯皮、规避文档缺陷、节省流量带宽 等)
* **开发提速巨大** (CRUD 零代码热更新自动化,APIJSONBoot 对比 SSM、SSH 等保守估计可提速 20 倍以上)
* **腾讯官方开源** (使用 GitHub、Gitee、工蜂 等平台的官方账号开源,微信公众号、腾讯云+社区 等官方公告)
-* **社区影响力大** (GitHub 1W+ Star 在 450W Java 项目中排名前 140,远超 FLAG, BAT 等国内外绝大部分开源项目)
+* **社区影响力大** (GitHub 1W+ Star 在 350W Java 项目中排名前 140,远超 FLAG, BAT 等国内外绝大部分开源项目)
* **各项荣誉成就** (腾讯内三个奖项、腾讯外两个奖项、腾讯后端项目 Star 第一、多次登上 GitHub Java 日周月榜 等)
* **多样用户案例** (腾讯内部用户包含 互娱、音乐、云与智慧,外部用户包含 500 强上市公司、数千亿资本国企 等)
* **适用场景广泛** (社交聊天、阅读资讯、影音视频、办公学习 等各种 App、网站、公众号、小程序 等非金融类项目)
From 358afde0b581f4be371f984422aa6289d38575e1 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Tue, 18 May 2021 12:00:58 +0800
Subject: [PATCH 129/947] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 0a969deb8..79b18a8f9 100644
--- a/README.md
+++ b/README.md
@@ -139,7 +139,7 @@ https://www.bilibili.com/video/BV1Tv411t74v
前后端 关于接口的 开发、文档、联调 等 10 大痛点解析
https://github.com/Tencent/APIJSON/wiki
-* **解决十大痛点** (APIJSON 可帮助用户 提振开发效率、杜绝联调扯皮、规避文档缺陷、节省流量带宽 等)
+* **解决多个痛点** (APIJSON 可帮助用户 提振开发效率、杜绝联调扯皮、规避文档缺陷、节省流量带宽 等)
* **开发提速巨大** (CRUD 零代码热更新自动化,APIJSONBoot 对比 SSM、SSH 等保守估计可提速 20 倍以上)
* **腾讯官方开源** (使用 GitHub、Gitee、工蜂 等平台的官方账号开源,微信公众号、腾讯云+社区 等官方公告)
* **社区影响力大** (GitHub 1W+ Star 在 350W Java 项目中排名前 140,远超 FLAG, BAT 等国内外绝大部分开源项目)
From f8592c5b274b0b4c0d4ab4b63bff4a8ff0e769a7 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Tue, 18 May 2021 12:01:33 +0800
Subject: [PATCH 130/947] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 79b18a8f9..0b5af5af4 100644
--- a/README.md
+++ b/README.md
@@ -136,10 +136,10 @@ https://www.bilibili.com/video/BV1Tv411t74v
### 为什么选择 APIJSON?
-前后端 关于接口的 开发、文档、联调 等 10 大痛点解析
+前后端 关于接口的 开发、文档、联调 等 10 个痛点解析
https://github.com/Tencent/APIJSON/wiki
-* **解决多个痛点** (APIJSON 可帮助用户 提振开发效率、杜绝联调扯皮、规避文档缺陷、节省流量带宽 等)
+* **解决十个痛点** (APIJSON 可帮助用户 提振开发效率、杜绝联调扯皮、规避文档缺陷、节省流量带宽 等)
* **开发提速巨大** (CRUD 零代码热更新自动化,APIJSONBoot 对比 SSM、SSH 等保守估计可提速 20 倍以上)
* **腾讯官方开源** (使用 GitHub、Gitee、工蜂 等平台的官方账号开源,微信公众号、腾讯云+社区 等官方公告)
* **社区影响力大** (GitHub 1W+ Star 在 350W Java 项目中排名前 140,远超 FLAG, BAT 等国内外绝大部分开源项目)
From 97942228dd3b49713dcad9952dd13fb896741f49 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Tue, 18 May 2021 12:03:05 +0800
Subject: [PATCH 131/947] Update README.md
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index 0b5af5af4..6e1f8a87a 100644
--- a/README.md
+++ b/README.md
@@ -143,7 +143,6 @@ https://github.com/Tencent/APIJSON/wiki
* **开发提速巨大** (CRUD 零代码热更新自动化,APIJSONBoot 对比 SSM、SSH 等保守估计可提速 20 倍以上)
* **腾讯官方开源** (使用 GitHub、Gitee、工蜂 等平台的官方账号开源,微信公众号、腾讯云+社区 等官方公告)
* **社区影响力大** (GitHub 1W+ Star 在 350W Java 项目中排名前 140,远超 FLAG, BAT 等国内外绝大部分开源项目)
-* **各项荣誉成就** (腾讯内三个奖项、腾讯外两个奖项、腾讯后端项目 Star 第一、多次登上 GitHub Java 日周月榜 等)
* **多样用户案例** (腾讯内部用户包含 互娱、音乐、云与智慧,外部用户包含 500 强上市公司、数千亿资本国企 等)
* **适用场景广泛** (社交聊天、阅读资讯、影音视频、办公学习 等各种 App、网站、公众号、小程序 等非金融类项目)
* **周边生态丰富** (Android, iOS, Web 等各种 Demo、继承 JSON 的海量生态、零代码 接口测试 和 单元测试 工具等)
From 1fca1270da303431ba00f329a7851e993d2f89b8 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Tue, 18 May 2021 12:05:32 +0800
Subject: [PATCH 132/947] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 6e1f8a87a..7adf5e1b7 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@ https://www.bilibili.com/video/BV1Tv411t74v
https://github.com/Tencent/APIJSON/wiki
* **解决十个痛点** (APIJSON 可帮助用户 提振开发效率、杜绝联调扯皮、规避文档缺陷、节省流量带宽 等)
-* **开发提速巨大** (CRUD 零代码热更新自动化,APIJSONBoot 对比 SSM、SSH 等保守估计可提速 20 倍以上)
+* **开发提速很大** (CRUD 零代码热更新自动化,APIJSONBoot 对比 SSM、SSH 等保守估计可提速 20 倍以上)
* **腾讯官方开源** (使用 GitHub、Gitee、工蜂 等平台的官方账号开源,微信公众号、腾讯云+社区 等官方公告)
* **社区影响力大** (GitHub 1W+ Star 在 350W Java 项目中排名前 140,远超 FLAG, BAT 等国内外绝大部分开源项目)
* **多样用户案例** (腾讯内部用户包含 互娱、音乐、云与智慧,外部用户包含 500 强上市公司、数千亿资本国企 等)
From a719ceb2d7433c163f87695c7568efcda3e7cdef Mon Sep 17 00:00:00 2001
From: kxlv2000 <49295281+kxlv2000@users.noreply.github.com>
Date: Wed, 19 May 2021 21:54:05 +0800
Subject: [PATCH 133/947] =?UTF-8?q?=E4=BC=98=E5=8C=96=20system.err.printli?=
=?UTF-8?q?n=20=E8=BE=93=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
issure #232
---
.../main/java/apijson/orm/AbstractParser.java | 35 +++++++++++++------
1 file changed, 25 insertions(+), 10 deletions(-)
diff --git a/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java b/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java
index e109b5a04..1525941b9 100755
--- a/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java
+++ b/APIJSONORM/src/main/java/apijson/orm/AbstractParser.java
@@ -48,11 +48,24 @@
public abstract class AbstractParser
-[Test it online](http://apijson.cn/)
+[Test it online](http://apijson.cn/api)

From 3b525d218450eebc4e4945d6e425a536b383b899 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Mon, 7 Jun 2021 00:25:36 +0800
Subject: [PATCH 142/947] English README: add new contributors
---
README-English.md | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/README-English.md b/README-English.md
index 770afb08d..40ab91fa7 100644
--- a/README-English.md
+++ b/README-English.md
@@ -331,17 +331,26 @@ Here are the contributers of this project and authors of other projects for ecos
height="54" width="54" >
+
+
+
+
+
+
+
+
+
From 0fc409b90132527aed936083c2454f317b1bd2c4 Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Wed, 9 Jun 2021 22:11:35 +0800
Subject: [PATCH 143/947] Update README.md
---
README.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/README.md b/README.md
index 952541e0a..0083f1814 100644
--- a/README.md
+++ b/README.md
@@ -129,9 +129,14 @@ APIJSON 是一种专为 API 而生的 JSON 网络传输协议 以及 基于这
### APIJSON 分享演讲
+APIJSON-零代码接口与文档 ORM 库(国际开源谷 Gitee Meetup)
https://www.bilibili.com/video/BV1Tv411t74v

+APIJSON和APIAuto-零代码开发和测试(QECon 全球软件质量&效能大会)
+https://www.bilibili.com/video/BV1yv411p7Y4
+
+
From 7e6097a1e2a63334272edd33b77789cda94e5eab Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Wed, 9 Jun 2021 22:27:11 +0800
Subject: [PATCH 144/947] =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=BC=94=E8=AE=B2?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=20QECon=20=E5=85=A8=E7=90=83=E8=BD=AF?=
=?UTF-8?q?=E4=BB=B6=E8=B4=A8=E9=87=8F&=E6=95=88=E8=83=BD=E5=A4=A7?=
=?UTF-8?q?=E4=BC=9A=20=E7=9A=84=E9=9B=B6=E4=BB=A3=E7=A0=81=E5=BC=80?=
=?UTF-8?q?=E5=8F=91=E5=92=8C=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://mp.weixin.qq.com/s/plcRVRcIN_1l59jCigNjhQ
---
README.md | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 0083f1814..4ed8b8a29 100644
--- a/README.md
+++ b/README.md
@@ -129,12 +129,17 @@ APIJSON 是一种专为 API 而生的 JSON 网络传输协议 以及 基于这
### APIJSON 分享演讲
-APIJSON-零代码接口与文档 ORM 库(国际开源谷 Gitee Meetup)
+#### APIJSON-零代码接口与文档 ORM 库(国际开源谷 Gitee Meetup)
+
https://www.bilibili.com/video/BV1Tv411t74v
+

-APIJSON和APIAuto-零代码开发和测试(QECon 全球软件质量&效能大会)
+
+#### APIJSON 和 APIAuto-零代码开发和测试(QECon 全球软件质量&效能大会)
+
https://www.bilibili.com/video/BV1yv411p7Y4
+
From 81da25d53389e14fa81c5091cb7595af592ff45d Mon Sep 17 00:00:00 2001
From: jun0315 <1072505283@qq.com>
Date: Fri, 11 Jun 2021 13:53:07 +0800
Subject: [PATCH 145/947] feat:log print current time
---
APIJSONORM/src/main/java/apijson/Log.java | 43 +++++++++++++++++++----
1 file changed, 36 insertions(+), 7 deletions(-)
diff --git a/APIJSONORM/src/main/java/apijson/Log.java b/APIJSONORM/src/main/java/apijson/Log.java
index eecc7e1c2..e3f64f86d 100755
--- a/APIJSONORM/src/main/java/apijson/Log.java
+++ b/APIJSONORM/src/main/java/apijson/Log.java
@@ -5,20 +5,49 @@
package apijson;
+import java.text.SimpleDateFormat;
+
/**测试用Log
* @modifier Lemon
*/
public class Log {
public static boolean DEBUG = true;
-
+
+ //默认的时间格式
+ public static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSS");
+
+ /**
+ * modify date format
+ * @param dateFormatString
+ */
+ public static void setDateFormat(String dateFormatString) {
+ dateFormat = new SimpleDateFormat(dateFormatString);
+ }
+
+ /**
+ * log info by level tag and msg
+ * @param TAG
+ * @param msg
+ * @param level
+ */
+ public static void logInfo(String TAG, String msg, String level){
+ if(level.equals("DEBUG") || level .equals("ERROR") ||level.equals("WARN")){
+ System.err.println(dateFormat.format(System.currentTimeMillis()) + ": " + TAG + "." + level + ": " + msg);
+ }
+ else if(level.equals("VERBOSE") || level .equals("INFO") ){
+ System.out.println(dateFormat.format(System.currentTimeMillis()) + ": " + TAG + "." + level + ": " + msg);
+ }
+ }
+
+
/**
* @param TAG
* @param msg
*/
public static void d(String TAG, String msg) {
if (DEBUG) {
- System.err.println(TAG + ".DEBUG: " + msg);
+ logInfo(TAG,msg,"DEBUG");
}
}
@@ -28,7 +57,7 @@ public static void d(String TAG, String msg) {
* @param msg debug messages
*/
public static void fd(String TAG, String msg) {
- System.err.println(TAG + ".DEBUG: " + msg);
+ logInfo(TAG,msg,"DEBUG");
}
/**
@@ -47,7 +76,7 @@ public static void sl(String pre,char symbol ,String post) {
*/
public static void v(String TAG, String msg) {
if (DEBUG) {
- System.out.println(TAG + ".VERBOSE: " + msg);
+ logInfo(TAG,msg,"VERBOSE");
}
}
@@ -57,7 +86,7 @@ public static void v(String TAG, String msg) {
*/
public static void i(String TAG, String msg) {
if (DEBUG) {
- System.out.println(TAG + ".INFO: " + msg);
+ logInfo(TAG,msg,"INFO");
}
}
@@ -67,7 +96,7 @@ public static void i(String TAG, String msg) {
*/
public static void e(String TAG, String msg) {
if (DEBUG) {
- System.err.println(TAG + ".ERROR: " + msg);
+ logInfo(TAG,msg,"ERROR");
}
}
@@ -77,7 +106,7 @@ public static void e(String TAG, String msg) {
*/
public static void w(String TAG, String msg) {
if (DEBUG) {
- System.err.println(TAG + ".WARN: " + msg);
+ logInfo(TAG,msg,"WARN");
}
}
From 7ade5730df83fb59216d1b7830e7df9ba2b7196d Mon Sep 17 00:00:00 2001
From: TommyLemon <1184482681@qq.com>
Date: Fri, 11 Jun 2021 16:30:23 +0800
Subject: [PATCH 146/947] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=80=E4=B8=AA?=
=?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=EF=BC=8C=E6=84=9F=E8=B0=A2=E4=B8=BA?=
=?UTF-8?q?=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=E6=96=B0=E5=A2=9E=E5=AF=B9?=
=?UTF-8?q?=E5=BA=94=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/Tencent/APIJSON/pull/250
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 4ed8b8a29..49ec6ac0b 100644
--- a/README.md
+++ b/README.md
@@ -261,6 +261,7 @@ https://github.com/Tencent/APIJSON/issues/187
+
Date: Fri, 11 Jun 2021 16:31:48 +0800
Subject: [PATCH 147/947] =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=E5=90=8D?=
=?UTF-8?q?=E5=8D=95=E6=96=B0=E5=A2=9E=20jun0315=EF=BC=8C=E6=84=9F?=
=?UTF-8?q?=E8=B0=A2=E4=B8=BA=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E5=AF=B9=E5=BA=94=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://github.com/Tencent/APIJSON/pull/250
---
CONTRIBUTING.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7613337a3..0c39db52c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,6 +29,7 @@
- [kxlv2000](https://github.com/kxlv2000)(SUSTech)
- [caohao-php](https://github.com/caohao-php)(腾讯工程师)
- [Wscats](https://github.com/Wscats)(腾讯工程师)
+- [jun0315](https://github.com/jun0315)
#### 其中特别致谢:
From b39dda60aedc32c0d41fad81df0fa966dd59e0c9 Mon Sep 17 00:00:00 2001
From: iceewei > values; //对应表内字段的值的字符串数组,','分隔
- private Map
> getValues() {
- return values;
- }
- @JSONField(serialize = false)
- public String getValuesString() {
- String s = "";
- if (values != null && values.size() > 0) {
- Object[] items = new Object[values.size()];
- List
> valuess) {
- this.values = valuess;
- return this;
- }
-
- @Override
- public Map
> valuess = new ArrayList<>(1);
- List
> values; //对应表内字段的值的字符串数组,','分隔
+ private Map
> getValues() {
+ return values;
+ }
+
+ @JSONField(serialize = false)
+ public String getValuesString() {
+ String s = "";
+ if (values != null && values.size() > 0) {
+ Object[] items = new Object[values.size()];
+ List
> valuess) {
+ this.values = valuess;
+ return this;
+ }
+
+ @Override
+ public Map