From 7f48021452c101a4574d209f7eed3da196b150cc Mon Sep 17 00:00:00 2001 From: huertian Date: Fri, 3 Jan 2025 16:26:52 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0API=E6=96=87=E6=A1=A3?= =?UTF-8?q?=201.=20=E6=B7=BB=E5=8A=A0=E6=90=9C=E7=B4=A2=E6=95=99=E5=B8=88?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=87=E6=A1=A3=202.=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E8=AF=B4=E6=98=8E=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=9D=9E=E6=95=99=E5=B8=88=E7=94=A8=E6=88=B7(10002)?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API文档.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/API文档.md b/API文档.md index e2fecdd..154d86b 100644 --- a/API文档.md +++ b/API文档.md @@ -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. 获取课程任务列表