-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
214 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
### Description | ||
|
||
(Pagination) Query list of departments | ||
|
||
### Parameters | ||
|
||
| Name | Type | Required | Description | | ||
|-----------|------|----------|---------------------------------------------| | ||
| page | int | No | Page number, default is 1 | | ||
| page_size | int | No | The number of pages per page, default is 10 | | ||
|
||
### Request Example | ||
|
||
``` | ||
// URL Query Parameters | ||
page=2&page_size=2 | ||
``` | ||
|
||
### Response Example for Status Code 200 | ||
|
||
```json5 | ||
{ | ||
"data": { | ||
"count": 2, | ||
"results": [ | ||
{ | ||
"id": 3, | ||
"name": "部门B", | ||
"parent_id": 1, | ||
}, | ||
{ | ||
"id": 4, | ||
"name": "中心AA", | ||
"parent_id": 2, | ||
} | ||
], | ||
} | ||
} | ||
``` | ||
|
||
### Response Parameters Description | ||
|
||
| Name | Type | Description | | ||
|-----------|--------|-------------------------------------| | ||
| id | int | Unique identifier of the department | | ||
| name | string | The name of the department | | ||
| parent_id | int | The parent department ID | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
### 描述 | ||
|
||
(分页)查询部门列表 | ||
|
||
### 输入参数 | ||
|
||
| 参数名称 | 参数类型 | 必选 | 描述 | | ||
|-----------|------|----|-------------| | ||
| page | int | 否 | 页码,从 1 开始 | | ||
| page_size | int | 否 | 每页数量,默认为 10 | | ||
|
||
### 请求示例 | ||
|
||
``` | ||
// URL Query 参数 | ||
page=2&page_size=2 | ||
``` | ||
|
||
### 状态码 200 的响应示例 | ||
|
||
```json5 | ||
{ | ||
"data": { | ||
"count": 2, | ||
"results": [ | ||
{ | ||
"id": 3, | ||
"name": "部门B", | ||
"parent_id": 1, | ||
}, | ||
{ | ||
"id": 4, | ||
"name": "中心AA", | ||
"parent_id": 2, | ||
} | ||
], | ||
} | ||
} | ||
``` | ||
|
||
### 响应参数说明 | ||
|
||
| 参数名称 | 参数类型 | 描述 | | ||
|-----------|--------|--------| | ||
| id | int | 部门唯一标识 | | ||
| name | string | 部门名称 | | ||
| parent_id | int | 父部门 ID | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters