docs: 更新API文档

1. 添加搜索教师接口文档
2. 更新错误码说明,添加非教师用户(10002)错误码
This commit is contained in:
huertian 2025-01-03 16:26:52 +08:00
parent 3c40fca9b3
commit 7f48021452

View File

@ -22,7 +22,7 @@
| ------ | ---------- | ---------- |
| 10000 | 成功 | 成功 |
| 10001 | 参数错误 | 参数无效 |
| 10002 | 邮箱重复 | 邮箱已存在 |
| 10002 | 非教师用户 | 非教师用户 |
| 10003 | 用户不存在 | 用户不存在 |
| 10004 | 密码错误 | 密码错误 |
| 10005 | 邮箱已存在 | 邮箱已存在 |
@ -270,6 +270,52 @@
}
```
### 8. 搜索教师信息
- **接口**`GET /api/users/teacher/search`
- **描述**:通过邮箱搜索教师信息
- **认证**:需要
- **查询参数**
- `email`: 教师邮箱
- **成功响应**
```json
{
"code": 10000,
"message": "成功",
"data": {
"id": 1,
"username": "张三",
"email": "user1@qq.com",
"password": null,
"departmentId": 2,
"roles": 1,
"jobs": 1,
"avatar": null,
"creatorId": 1,
"status": 1,
"createdAt": 1734504506,
"updatedAt": 1734504506,
"enabled": true,
"accountNonExpired": true,
"accountNonLocked": true,
"credentialsNonExpired": true,
"authorities": [
{
"authority": "ROLE_USER"
}
]
}
}
```
- **错误响应**
```json
{
"code": 10009,
"message": "系统错误",
"data": null
}
```
## 课程任务接口
### 1. 获取课程任务列表