12. 【Manager】公司接口
12.1. 获取所有公司
URL: /ma/corp/listAll
Type: GET
Author: Timothy
Content-Type: application/x-www-form-urlencoded
Description: 获取所有公司
Query-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
keyword |
string |
No comments found. |
false |
- |
pageNum |
int32 |
页码 |
false |
- |
pageSize |
int32 |
页面大小 |
false |
- |
Request-example:
curl -X GET -i '/ma/corp/listAll?pageNum=0&pageSize=0&=vdod56'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
total |
int64 |
No comments found. |
- |
list |
array |
No comments found. |
- |
└─id |
int32 |
ID |
- |
└─name |
string |
公司名称 |
- |
└─fullname |
string |
公司全称 |
- |
└─captain |
string |
公司法人 |
- |
└─nature |
string |
公司性质 |
- |
└─code |
string |
信用代码 |
- |
└─foundation |
string |
创办日期 |
- |
└─address |
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": "",
"fullname": "",
"captain": "",
"nature": "",
"code": "",
"foundation": "yyyy-MM-dd",
"address": "",
"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
}
12.2. 更新公司信息
URL: /ma/corp/update
Type: PUT
Author: Timothy
Content-Type: application/json
Description: 更新公司信息
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
id |
int32 |
ID |
false |
- |
name |
string |
公司名称 |
false |
- |
fullname |
string |
公司全称 |
false |
- |
captain |
string |
公司法人 |
false |
- |
nature |
string |
公司性质 |
false |
- |
code |
string |
信用代码 |
false |
- |
foundation |
string |
创办日期 |
false |
- |
address |
string |
注册地址 |
false |
- |
createDate |
string |
添加时间 |
false |
- |
updateDate |
string |
更新时间 |
false |
- |
Request-example:
curl -X PUT -H "Content-Type: application/json" -i '/ma/corp/update' --data '{
"id": 0,
"name": "",
"fullname": "",
"captain": "",
"nature": "",
"code": "",
"foundation": "yyyy-MM-dd",
"address": "",
"createDate": "yyyy-MM-dd HH:mm:ss",
"updateDate": "yyyy-MM-dd HH:mm:ss"
}'
Response-example:
0
12.3. 移除公司
URL: /ma/corp/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/corp/remove?id=0&=195'
Response-example:
0