Appearance
获取员工列表 API
| Path | Method | Created At |
|---|---|---|
| /api/accounts/employees/paginate | POST | 2025-11-29 00:39:11 |
Request
| Key | Rule | Description |
|---|---|---|
| page | integer,min:1,max:100 | 页码必须是正整数 |
| page_size | integer,min:5,max:1000 | 每页数量必须是正整数 |
| department_id | integer,min:0 | trans:validate.DEPARTMENT_NOT_FOUND |
| conditions | array | 查询条件不正确 |
Response
| Key | Type | Example | Comment |
|---|---|---|---|
| id | int | 1 | 员工ID |
| employeeNo | string | 10001 | 员工编号 |
| gender | enum | Gender | 性别 |
| name | string | 张三 | 姓名 |
| username | string | ZhangSan | 登录用户名 |
| departmentId | int | 2 | 部门编号 |
| departmentPath | array | ["亚服", "运营部", "浙江站"] | 所在部门 |
| phone | string | 13945687890 | 手机号 |
| string | username@domain.com | 邮箱 | |
| positionId | int | 3 | 岗位编号 |
| positionName | string | 技术部 | 岗位名称 |
| status | enum | UserStatus | 在职状态 |
| createdAt | string | 2023-04-05 06:07:09 | 入职时间 |
TypeScript Result Example:
TypeScript
interface Result {
/** 员工ID */
id: number;
/** 员工编号 */
employeeNo: string;
/** 性别 */
gender: ResultGender;
/** 姓名 */
name: string;
/** 登录用户名 */
username: string;
/** 部门编号 */
departmentId: number;
/** 所在部门 */
departmentPath: any;
/** 手机号 */
phone: string;
/** 邮箱 */
email: string;
/** 岗位编号 */
positionId: number;
/** 岗位名称 */
positionName: string;
/** 在职状态 */
status: ResultStatus;
/** 入职时间 */
createdAt: string;
}
enum ResultGender {
/** 男 */
MALE = "MALE",
/** 女 */
FEMALE = "FEMALE"
}
enum ResultStatus {
/** 在职 */
EMPLOYED = "EMPLOYED",
/** 离职 */
RESIGNED = "RESIGNED"
}Enums
Gender
| Const | Description |
|---|---|
| MALE | 男 |
| FEMALE | 女 |
UserStatus
| Const | Description |
|---|---|
| EMPLOYED | 在职 |
| RESIGNED | 离职 |