5. 岗位管理
新增岗位
接口地址
api/post/addPost
请求方式
POST
请求参数
请求参数 | 必传 | 参数说明 |
---|---|---|
post_name | ✅ | 岗位名称 |
post_code | ✅ | 岗位编码 |
sort | ✅ | 排序 |
响应示例
{
"code": 200,
"message": "成功",
"data": ""
}
更新岗位,删除岗位
当status=0的时候视为删除岗位
接口地址
api/post/updatePost
请求方式
PUT
请求参数
请求参数 | 必传 | 参数说明 |
---|---|---|
id | ✅ | 岗位ID |
post_name | ✅ | 岗位名称 |
post_code | ✅ | 岗位编码 |
sort | ✅ | 排序 |
响应示例
{
"code": 200,
"message": "成功",
"data": ""
}
获取岗位详情
接口地址
api/post/getPostDetail
请求方式
GET
请求参数
请求参数 | 必传 | 参数说明 |
---|---|---|
id | ✅ | 部门ID |
响应示例
{
"code": 200,
"message": "成功",
"data": {
"id": 1,
"post_name": "开发",
"post_code": "develope",
"sort": 1,
"status": 1,
"create_time": "2020-06-10 14:54:58",
"update_time": "2020-06-10 14:55:00"
}
}
获取岗位列表
接口地址
api/post/getPostList
请求方式
GET
请求参数
请求参数 | 必传 | 参数说明 |
---|---|---|
post_name | 岗位名称 | |
post_code | 岗位编码 | |
status | 状态 0:下架 1:上架 | |
page | 页码 | |
size | 页数 |
响应示例
{
"code": 200,
"message": "成功",
"data": {
"total": 1,
"per_page": 15,
"current_page": 1,
"last_page": 1,
"data": [
{
"id": 1,
"post_name": "开发",
"post_code": "develope",
"sort": 1,
"status": 1,
"create_time": "2020-06-10 14:54:58",
"update_time": "2020-06-10 14:55:00"
}
]
}
}