获取-员工列表
GET
/sys/user获取员工列表
注意1: 头像地址是阿里云对象存储完整地址
注意2: 头像是其他人传到他们自己的阿里云对象存储中返回的地址, 存储到了数据库里, 但是图片文件真身被其他人删除了, 此地址还在但是文件不在了会报404(暂不用解决)
请求参数
Query 参数
page
string
当前页码数
示例值:
1
size
string
必需
当前页面需要的数据条数
示例值:
10
Header 参数
Authorization
string
必需
Bearer token值, 示例值: Bearer fda5da47-c18b-42d7-a8d9-7cc72a10abbd
示例值:
{{Vue2_HR_ACCESS_TOKEN}}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
success
boolean
响应状态
true成功, false失败
code
integer
业务状态码
10000成功, 其他失败
data
object
响应数据
total
integer
数据总数
指的在后台数据库里一共有多少条数据匹配
rows
array [object {10}]
员工列表
message
string
响应消息
示例
成功示例
{
"success": true,
"code": 10000,
"data": {
"total": 22,
"rows": [
{
"id": "604f764971f93f3ac8f365c2",
"mobile": "13800000002",
"username": "管理员",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "2018-11-02",
"formOfEmployment": 1,
"workNumber": "9002",
"correctionTime": "2018-11-30",
"departmentName": "总裁办",
"staffPhoto": "http://q6cu3t6jv.bkt.clouddn.com/1063705989926227968?t=1616204161907"
},
{
"id": "604f764971f93f3ac8f365c3",
"mobile": "13800000003",
"username": "孙财",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "2018-11-04",
"formOfEmployment": 1,
"workNumber": "111",
"correctionTime": "2018-11-20",
"departmentName": "市场部",
"staffPhoto": "http://q6cu3t6jv.bkt.clouddn.com/1063705989926227968?t=1616204161907"
},
{
"id": "604f764971f93f3ac8f365c4",
"mobile": "13800000004",
"username": "罗晓晓",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "2018-12-02",
"formOfEmployment": 1,
"workNumber": "1111",
"correctionTime": "2018-12-31",
"departmentName": "人事部",
"staffPhoto": "http://q6cu3t6jv.bkt.clouddn.com/1063705989926227968?t=1616204161907"
},
{
"id": "604f764971f93f3ac8f365c6",
"mobile": "13400000002",
"username": "巴思慧",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "2018-01-01",
"formOfEmployment": 1,
"workNumber": "1002",
"correctionTime": "1970-01-01",
"departmentName": "人事部",
"staffPhoto": ""
},
{
"id": "604f764971f93f3ac8f365c7",
"mobile": "13500000001",
"username": "乔海",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "2018-01-01",
"formOfEmployment": 1,
"workNumber": "2001",
"correctionTime": "1970-01-01",
"departmentName": "总裁办",
"staffPhoto": ""
},
{
"id": "604f764971f93f3ac8f365c8",
"mobile": "13500000002",
"username": "董昊空",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "2018-01-01",
"formOfEmployment": 1,
"workNumber": "2002",
"correctionTime": "1970-01-01",
"departmentName": "总裁办",
"staffPhoto": ""
},
{
"id": "604f764971f93f3ac8f365c9",
"mobile": "13500000003",
"username": "周乐天",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "2018-01-01",
"formOfEmployment": 1,
"workNumber": "2003",
"correctionTime": "1970-01-01",
"departmentName": "财务部",
"staffPhoto": ""
},
{
"id": "604f764971f93f3ac8f365ca",
"mobile": "13600000001",
"username": "吕勇锐",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "1992-08-04",
"formOfEmployment": 1,
"workNumber": "0001",
"correctionTime": "2020-01-01",
"departmentName": "总裁办",
"staffPhoto": ""
},
{
"id": "604f764971f93f3ac8f365cb",
"mobile": "13600000002",
"username": "袁永安",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "1993-08-04",
"formOfEmployment": 1,
"workNumber": "0002",
"correctionTime": "2020-01-01",
"departmentName": "总裁办",
"staffPhoto": ""
},
{
"id": "604f764971f93f3ac8f365cc",
"mobile": "13600000003",
"username": "罗英卓",
"password": "e10adc3949ba59abbe56e057f20f883e",
"timeOfEntry": "1993-08-04",
"formOfEmployment": 1,
"workNumber": "0003",
"correctionTime": "2020-01-01",
"departmentName": "行政部",
"staffPhoto": ""
}
]
},
"message": "获取员工列表成功"
}
最后修改时间: 2 年前