Header:
| 参数 |
示例值 |
是否必须 |
如何获取 |
| Authorization |
Bearer{此处空格}{access_token} |
[√] |
调用接口"获取授权"得到 |
接口说明:无
返回示例:
{
"status": 0,
"message": "请求成功",
"timestamp": 1765252793800,
"result": [
{
"id": 4455,
"parentId": 0,
"name": "财务部",
"type": "2",
"coordinate": "4455",
"addTime": "2025-06-07 10:19:19",
"children": [
{
"id": 4738,
"parentId": 4455,
"name": "c2",
"type": "2",
"coordinate": "4455>4738",
"addTime": "2025-12-05 17:54:28"
},
{
"id": 4737,
"parentId": 4455,
"name": "c1",
"type": "2",
"coordinate": "4455>4737",
"addTime": "2025-12-05 17:54:21",
"children": [
{
"id": 4739,
"parentId": 4737,
"name": "c101",
"type": "2",
"coordinate": "4455>4737>4739",
"addTime": "2025-12-05 17:54:36"
}
]
}
]
},
{
"id": 4452,
"parentId": 0,
"name": "采购部",
"type": "2",
"coordinate": "4452",
"addTime": "2025-06-07 10:19:18"
},
{
"id": 4453,
"parentId": 0,
"name": "总经办",
"type": "2",
"coordinate": "4453",
"addTime": "2025-06-07 10:19:18"
},
{
"id": 4454,
"parentId": 0,
"name": "仓库部",
"type": "2",
"coordinate": "4454",
"addTime": "2025-06-07 10:19:18"
},
{
"id": 4450,
"parentId": 0,
"name": "销售部",
"type": "2",
"coordinate": "4450",
"addTime": "2025-06-07 10:19:17"
},
{
"id": 4451,
"parentId": 0,
"name": "生产部",
"type": "2",
"coordinate": "4451",
"addTime": "2025-06-07 10:19:17"
}
]
}
| 字段 |
类型 |
说明 |
| id |
Integer |
部门id |
| parentId |
Integer |
父部门id(0为根部门) |
| name |
String |
部门名称 |
| type |
Integer |
部门类型【1: 2:】 |
| coordinate |
String |
部门层级,例:"根部门id>父部门id>...>当前部门id" |
| addTime |
String |
部门创建时间 |
| children |
Array |
子部门(无子部门该字段空) |
{
"message": "无效的 Authorization",
"status": 30001,
"timestamp": 1765259596422
}
{
"message": "无调用权限",
"status": 30000,
"timestamp": 1765258897680
}