Browse Source

新增api同步表接口

master
Morning.Chen 1 year ago
parent
commit
96ea667fbb
  1. 112
      README.md

112
README.md

@ -361,7 +361,8 @@ updateMode: 更新方式
"data": [
{
"id": "31ea502409f249cf95a361c17088a3ee",
"name": "店铺"
"name": "店铺",
"type": 28
}
]
}
@ -389,10 +390,13 @@ updateMode: 更新方式
请求类型:POST
请求参数: ```{
"token": "7d08cb01",
"storeId": "31ea502409f249cf95a361c17088a3ee"
}```
请求参数:
```
{
"token": "7d08cb01",
"storeId": "31ea502409f249cf95a361c17088a3ee"
}
```
返回值:
```json
@ -404,3 +408,101 @@ updateMode: 更新方式
}
```
#### 获取store下所有的表
请求地址:```/api/v1/store/tables```
请求类型:POST
请求参数:
```
{
"storeId": "5fb0ad5df26b4598b073e979ddf4fb1a"(/store/info接口返回的id)
}
```
返回值:
```json
{
"success": true,
"code": "200",
"message": "success",
"data": [
{
"id": "239a9528b09942ee822ffaa41585dc356194dde1",
"name": "合同事实表"
},
{
"id": "239a9528b09942ee822ffaa41585dc356b6cce97",
"name": "111"
}
]
}
```
#### 数据源表单表同步
请求地址:```/api/v1/sync/table```
请求类型:POST
请求参数:
```
{
"tableId": "239a9528b09942ee822ffaa41585dc356194dde1"(/store/tables返回的表id),
"type": 28(/store/info返回的type)
}
```
返回值:
```json
{
"success": true,
"code": "200",
"message": "success",
"data": true,
}
```
注:
1、目前只支持对钉钉、简道云、数据库以及云数据库的数据源表进行更新
#### 数据源表批量同步
请求地址:```/api/v1/sync/table```
请求类型:POST
请求参数:
```
{
"tables": [
{
"tableId": "69a5aab540a14dfea3138d67e377ffaf_64efefb47c70eb00063a3891_6368cf27de256c000a6cc773"(/store/tables返回的表id),
"storeId": "69a5aab540a14dfea3138d67e377ffaf"(/store/info接口返回的id)
},
{
"tableId": "69a5aab540a14dfea3138d67e377ffaf_64efefb47c70eb00063a3891_636b2c51c27bf3000a2eb438",
"storeId": "69a5aab540a14dfea3138d67e377ffaf"
}
],
"type": 28(/store/info返回的type)
}
```
返回值:
```json
{
"success": true,
"code": "200",
"message": "success",
"data": true,
}
```
注:
1、批量同步时,所有要同步的表必须是同一种数据源表

Loading…
Cancel
Save