- 必须先读
- Ajax编程_V7.6大纲配套
- 数据可视化
- Vue基础
- Vue_大事件
- 黑马头条号
- 极客园_PC
- 极客园(黑马头条)_移动端
- 人资项目
- 小兔鲜电商
- 小程序基础
- 小程序项目
- layui_大事件
- 品优购电商后台
- 其他可用接口
批量-导入员工
POST
/sys/user/batch
注意: 无参数名, 直接在请求体携带数组
请求参数
Header 参数
Authorization
string
必需
示例值:
{{Vue2_HR_ACCESS_TOKEN}}
Body 参数application/json
无参数名, 直接在请求体携带数组
array of:
mobile
integer
员工手机号
username
string
员工名字
timeOfEntry
integer
员工入职日期
correctionTime
integer
员工转正日期
workNumber
integer
员工工号
示例
[
{
"mobile": 13912345699,
"username": "高小明2",
"timeOfEntry": 43527,
"correctionTime": 43709,
"workNumber": 111
},
{
"mobile": 13912345699,
"username": "高小明2",
"timeOfEntry": 43527,
"correctionTime": 43709,
"workNumber": 111
},
{
"mobile": 13912345699,
"username": "高小明2",
"timeOfEntry": 43527,
"correctionTime": 43709,
"workNumber": 111
}
]
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://ihrm.itheima.net/prod-api/sys/user/batch' \
--header 'Authorization: {{Vue2_HR_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"mobile": 13912345699,
"username": "高小明2",
"timeOfEntry": 43527,
"correctionTime": 43709,
"workNumber": 111
},
{
"mobile": 13912345699,
"username": "高小明2",
"timeOfEntry": 43527,
"correctionTime": 43709,
"workNumber": 111
},
{
"mobile": 13912345699,
"username": "高小明2",
"timeOfEntry": 43527,
"correctionTime": 43709,
"workNumber": 111
}
]'
返回响应
🟢200成功
application/json
Body
success
boolean
响应状态
code
integer
业务状态码
data
null
响应数据
message
string
响应消息
示例
{
"success": true,
"code": 10000,
"data": null,
"message": "批量导入员工成功"
}
修改于 2022-07-10 03:09:12