6. 【Manager】部门接口
6.1. 获取指定公司所有部门
URL: /ma/dept/listAll
Type: GET
Author: Timothy
Content-Type: application/x-www-form-urlencoded
Description: 获取指定公司所有部门
Query-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
corpId |
int32 |
No comments found. |
false |
- |
keyword |
string |
No comments found. |
false |
- |
pageNum |
int32 |
页码 |
false |
- |
pageSize |
int32 |
页面大小 |
false |
- |
Request-example:
curl -X GET -i '/ma/dept/listAll?corpId=0&pageNum=0&pageSize=0&=q2phrr'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
total |
int64 |
No comments found. |
- |
list |
array |
No comments found. |
- |
└─id |
int32 |
ID |
- |
└─name |
string |
部门名称 |
- |
└─corpId |
int32 |
公司ID |
- |
└─corpName |
string |
公司简称 |
- |
└─nature |
string |
部门性质 |
- |
└─createDate |
string |
创建时间 |
- |
└─updateDate |
string |
更新时间 |
- |
pageNum |
int32 |
当前页 |
- |
pageSize |
int32 |
每页的数量 |
- |
size |
int32 |
当前页的数量 |
- |
startRow |
int64 |
由于startRow和endRow不常用,这里说个具体的用法 |
- |
endRow |
int64 |
当前页面最后一个元素在数据库中的行号 |
- |
pages |
int32 |
总页数 |
- |
prePage |
int32 |
前一页 |
- |
nextPage |
int32 |
下一页 |
- |
firstPage |
boolean |
是否为第一页 |
- |
lastPage |
boolean |
是否为最后一页 |
- |
hasPreviousPage |
boolean |
是否有前一页 |
- |
hasNextPage |
boolean |
是否有下一页 |
- |
navigatePages |
int32 |
导航页码数 |
- |
navigatepageNums |
array |
所有导航页号 |
- |
navigateFirstPage |
int32 |
导航条上的第一页 |
- |
navigateLastPage |
int32 |
导航条上的最后一页 |
- |
Response-example:
{
"total": 0,
"list": [
{
"id": 0,
"name": "",
"corpId": 0,
"corpName": "",
"nature": "",
"createDate": "yyyy-MM-dd HH:mm:ss",
"updateDate": "yyyy-MM-dd HH:mm:ss"
}
],
"pageNum": 0,
"pageSize": 0,
"size": 0,
"startRow": 0,
"endRow": 0,
"pages": 0,
"prePage": 0,
"nextPage": 0,
"firstPage": true,
"lastPage": true,
"hasPreviousPage": true,
"hasNextPage": true,
"navigatePages": 0,
"navigatepageNums": [
0
],
"navigateFirstPage": 0,
"navigateLastPage": 0
}
6.2. 更新部门信息
URL: /ma/dept/update
Type: PUT
Author: Timothy
Content-Type: application/json
Description: 更新部门信息
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id |
int32 |
ID |
false |
- |
name |
string |
部门名称 |
false |
- |
corpId |
int32 |
公司ID |
false |
- |
corpName |
string |
公司简称 |
false |
- |
nature |
string |
部门性质 |
false |
- |
createDate |
string |
创建时间 |
false |
- |
updateDate |
string |
更新时间 |
false |
- |
Request-example:
curl -X PUT -H "Content-Type: application/json" -i '/ma/dept/update' --data '{
"id": 0,
"name": "",
"corpId": 0,
"corpName": "",
"nature": "",
"createDate": "yyyy-MM-dd HH:mm:ss",
"updateDate": "yyyy-MM-dd HH:mm:ss"
}'
Response-example:
0
6.3. 移除部门
URL: /ma/dept/remove
Type: DELETE
Author: Timothy
Content-Type: application/x-www-form-urlencoded
Description: 移除部门
Query-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id |
int32 |
No comments found. |
false |
- |
Request-example:
curl -X DELETE -i '/ma/dept/remove?id=0&=735'
Response-example:
0