Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2f97c8c

Browse files
Merge pull request APIJSON#28 from cloudAndMonkey/master
清理代码,补充readme
2 parents 576eb7b + 9b28004 commit 2f97c8c

File tree

4 files changed

+10
-272
lines changed

4 files changed

+10
-272
lines changed

‎APIJSON-Java-Server/APIJSONDemo-MultiDataSource-Elasticsearch/README.md‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# APIJSONDemo
22

3-
## 1、支持多数据源
3+
## 支持多数据源
44

55
数据源解析顺序:
66

@@ -48,21 +48,25 @@
4848

4949
![image](https://user-images.githubusercontent.com/12228225/207245545-277ba9a6-e87f-42b3-af55-9d6a37384a1e.png)
5050

51-
## 2、集成elasticsearch-sql
51+
## 集成elasticsearch-sql
5252

5353
换成xpack, 也一样
5454

5555
应用导入: elasticsearch-sql-7.17.5.0.jar
5656

57-
## 3、apijson支持elasticsearch功能点
57+
## apijson elasticsearch type支持
58+
59+
APIJSONSQLConfig.*TABLE_KEY_MAP*.put("ES_blog", "es_blog/doc");
60+
61+
## apijson支持elasticsearch功能点
5862

5963
新增、修改、删除、查询
6064

61-
## 4、elasticsearch-sql不支持RLIKE
65+
## elasticsearch-sql不支持RLIKE
6266

6367
![image](https://user-images.githubusercontent.com/12228225/207245701-ea2560a9-2389-4953-a568-9e85adfb15ad.png)
6468

65-
## 5、apijson支持字段 .keyword
69+
## apijson支持字段 .keyword
6670

6771
```
6872
{
@@ -81,7 +85,7 @@
8185

8286

8387

84-
## 4、示例
88+
## 示例
8589

8690
### 单条插入
8791

‎APIJSON-Java-Server/APIJSONDemo-MultiDataSource-Elasticsearch/src/main/java/apijson/demo/DemoFunctionParser.java‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -77,43 +77,11 @@ public void pwdEncrypt(@NotNull JSONObject current, @NotNull String id, @NotNull
7777
current.put(password, c_password + "_" + System.currentTimeMillis());
7878
}
7979

80-
/***
81-
* 业务表-插入不同表1:n <br/>
82-
* 业务表-批量修改不同表1:n <br/>
83-
* 测试 子表 前置函数调用,修改值是否成果 <br/>
84-
* user_address 表 addr字段
85-
*
86-
* @param current
87-
* @param password
88-
* @return
89-
* @throws Exception
90-
*/
9180
public void childFunTest(@NotNull JSONObject current, @NotNull String addr) throws Exception {
9281
String c_addr = current.getString(addr);
9382
current.put(addr, c_addr + "_" + System.currentTimeMillis());
9483
}
9584

96-
/***
97-
* 没有在外层事物里面
98-
*
99-
* @throws Exception
100-
*/
101-
// private void insertTest() throws Exception {
102-
// String json = "{\n" + " \"User\":{\n" + " \"username\":\"test\",\n"
103-
// + " \"password\": \"233223\",\n" + " \"state\": 1\n" + " },\n" + " \"tag\": \"User\"\n"
104-
// + "}";
105-
// com.alibaba.fastjson.JSONObject requestObject = AbstractParser.parseRequest(json);
106-
// JSONResponse response = new JSONResponse(new FormParser(POST, false).parseResponse(requestObject));
107-
// log.info(response.toJSONString());
108-
// }
109-
//
110-
// private void selectTest() throws Exception {
111-
// String json = "{\n" + " \"User\": {\n" + " \"id\": \"4732209c-5785-4827-b532-5092f154fd94\"\n"
112-
// + " },\n" + " \"tag\": \"User\"\n" + "}";
113-
// com.alibaba.fastjson.JSONObject requestObject = AbstractParser.parseRequest(json);
114-
// JSONResponse response = new JSONResponse(new FormParser(GET, false).parseResponse(requestObject));
115-
// log.info(response.toJSONString());
116-
// }
11785

11886
public void removeKeys(@NotNull JSONObject current, String keys) {
11987
String[] ks = StringUtil.split(keys, ";"); // 用分号 ; 分割

‎APIJSON-Java-Server/APIJSONDemo-MultiDataSource-Elasticsearch/src/main/java/apijson/demo/DynamicJdbcDataSource.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
* 1、应用启动添加数据源
4141
* 2、页面动态添加数据源(数据库存储数据源信息)
4242
*
43-
* @author xy
4443
*
4544
*/
4645
@Data

‎APIJSON-Java-Server/APIJSONDemo-MultiDataSource-Elasticsearch/src/main/java/apijson/demo/ElasticSearchSqlTest.java‎

Lines changed: 0 additions & 233 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /