From 5cb903d7ed3298a490f6897e7197dddcd3b589c2 Mon Sep 17 00:00:00 2001 From: zhonghua Date: Fri, 20 Mar 2026 18:43:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=B6=E9=95=BF=E7=AB=AF=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E3=80=81=E6=95=99=E5=B8=88=E7=AB=AF=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E3=80=81=E6=95=B0=E6=8D=AE=E5=BA=93=E8=BF=81=E7=A7=BB=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 家长端阅读任务:从 task_target 获取任务(学生+班级),支持家长关联孩子查看 - 家长端提交任务:修复照片上传,使用 uploadFile(file, poster) 符合 API 规范 - 教师端任务列表:TaskResponse 新增 targetCount、completionCount,填充目标人数与完成人数 - 数据库迁移:V45 添加 task_completion.photos,V46 添加 submitted_at、reviewed_at - 其他:班级学生、家长孩子、学校班级统计等修复 Made-with: Cursor --- reading-platform-frontend/openapi.json | 3656 +++++++++++++---- .../src/api/generated/index.ts | 373 +- .../model/batchStudentRecordsRequest.ts | 16 + .../api/generated/model/childInfoResponse.ts | 29 + .../generated/model/childProfileResponse.ts | 31 + .../src/api/generated/model/classInfo.ts | 19 + .../api/generated/model/completeTaskParams.ts | 2 +- .../model/courseCollectionPageQueryRequest.ts | 2 + .../src/api/generated/model/courseInfo.ts | 17 + .../generated/model/coursePageQueryRequest.ts | 2 + .../src/api/generated/model/courseResponse.ts | 11 +- .../api/generated/model/dayScheduleItem.ts | 2 + .../generated/model/getAllCoursesParams.ts | 13 + .../generated/model/getChildLessonsParams.ts | 12 + .../generated/model/getCoursePageParams.ts | 4 +- .../model/getMyNotifications1Params.ts | 1 + .../generated/model/getStatisticsParams.ts | 13 + .../model/getTaskCompletions1Params.ts | 13 + .../model/getTaskCompletionsParams.ts | 13 + .../api/generated/model/getTaskListParams.ts | 23 + .../api/generated/model/getTaskPageParams.ts | 1 + .../generated/model/getTemplates1Params.ts | 2 + .../api/generated/model/getTemplatesParams.ts | 1 + .../model/growthRecordForParentResponse.ts | 29 + .../src/api/generated/model/index.ts | 52 + .../generated/model/lessonDetailResponse.ts | 2 +- .../src/api/generated/model/lessonInfo.ts | 19 + .../generated/model/lessonRecordResponse.ts | 29 + .../api/generated/model/lessonTagResponse.ts | 17 + .../model/notificationForParentResponse.ts | 27 + ...pageResultGrowthRecordForParentResponse.ts | 16 + .../model/pageResultLessonRecordResponse.ts | 16 + ...pageResultNotificationForParentResponse.ts | 16 + .../model/pageResultSchoolCourseResponse.ts | 16 + .../pageResultTaskCompletionDetailResponse.ts | 16 + .../pageResultTaskWithCompletionResponse.ts | 16 + .../model/resultChildProfileResponse.ts | 14 + .../resultGrowthRecordForParentResponse.ts | 14 + .../model/resultListChildInfoResponse.ts | 14 + ...resultListGrowthRecordForParentResponse.ts | 14 + .../generated/model/resultMapStringString.ts | 14 + .../model/resultMapStringStringData.ts | 9 + .../resultNotificationForParentResponse.ts | 14 + ...PageResultGrowthRecordForParentResponse.ts | 14 + .../resultPageResultLessonRecordResponse.ts | 14 + ...PageResultNotificationForParentResponse.ts | 14 + .../resultPageResultSchoolCourseResponse.ts | 14 + ...tPageResultTaskCompletionDetailResponse.ts | 14 + ...ultPageResultTaskWithCompletionResponse.ts | 14 + .../model/resultSchoolCourseResponse.ts | 14 + .../model/resultStudentRecordsResponse.ts | 14 + .../resultTaskCompletionDetailResponse.ts | 14 + .../model/resultTaskFeedbackResponse.ts | 14 + .../generated/model/schoolCourseResponse.ts | 50 + .../src/api/generated/model/statsInfo.ts | 19 + .../src/api/generated/model/studentInfo.ts | 23 + .../generated/model/studentRecordsResponse.ts | 18 + .../model/studentWithRecordResponse.ts | 21 + .../src/api/generated/model/task.ts | 2 + .../generated/model/taskCompleteRequest.ts | 19 + .../model/taskCompletionDetailResponse.ts | 39 + .../api/generated/model/taskCreateRequest.ts | 8 + .../generated/model/taskFeedbackRequest.ts | 27 + .../generated/model/taskFeedbackResponse.ts | 33 + .../src/api/generated/model/taskInfo.ts | 29 + .../src/api/generated/model/taskResponse.ts | 6 + .../api/generated/model/taskSubmitRequest.ts | 31 + .../model/taskTemplateCreateRequest.ts | 4 +- .../api/generated/model/taskUpdateRequest.ts | 12 + .../model/taskWithCompletionResponse.ts | 33 + .../generated/model/teacherCreateRequest.ts | 6 +- .../api/generated/model/teacherResponse.ts | 11 +- .../model/teacherResponseClassNames.ts | 12 + .../generated/model/teacherUpdateRequest.ts | 2 + .../generated/model/tenantCreateRequest.ts | 6 +- .../src/api/generated/model/tenantResponse.ts | 4 +- .../generated/model/tenantUpdateRequest.ts | 4 +- reading-platform-frontend/src/api/parent.ts | 52 +- reading-platform-frontend/src/api/school.ts | 13 +- reading-platform-frontend/src/api/teacher.ts | 9 +- .../src/views/parent/DashboardView.vue | 66 +- .../src/views/parent/LayoutView.vue | 139 +- .../views/parent/growth/GrowthRecordView.vue | 78 +- .../parent/lessons/LessonHistoryView.vue | 72 +- .../src/views/parent/tasks/TaskListView.vue | 173 +- .../views/school/students/StudentListView.vue | 21 +- .../views/teacher/classes/ClassListView.vue | 2 +- .../src/views/teacher/tasks/TaskListView.vue | 114 +- .../parent/ParentChildController.java | 46 +- .../parent/ParentGrowthController.java | 103 +- .../parent/ParentNotificationController.java | 35 +- .../parent/ParentTaskController.java | 52 +- .../school/SchoolClassController.java | 75 +- .../school/SchoolParentController.java | 52 +- .../school/SchoolStudentController.java | 16 +- .../teacher/TeacherCourseController.java | 74 +- .../teacher/TeacherTaskController.java | 6 +- .../dto/request/StudentUpdateRequest.java | 3 + .../dto/request/TaskCompleteRequest.java | 21 + .../dto/response/ChildInfoResponse.java | 57 + .../dto/response/ChildProfileResponse.java | 60 + .../platform/dto/response/ClassResponse.java | 15 + .../dto/response/ClassStudentsResponse.java | 51 + .../dto/response/ClassTeacherResponse.java | 6 + .../GrowthRecordForParentResponse.java | 56 + .../dto/response/LessonRecordResponse.java | 75 + .../NotificationForParentResponse.java | 40 + .../platform/dto/response/ParentResponse.java | 3 + .../dto/response/StudentResponse.java | 3 + .../platform/dto/response/TaskResponse.java | 6 + .../response/TaskWithCompletionResponse.java | 92 + .../platform/service/ClassService.java | 15 + .../platform/service/NotificationService.java | 6 + .../platform/service/ParentAuthService.java | 25 + .../platform/service/ParentChildService.java | 22 + .../platform/service/ParentLessonService.java | 21 + .../platform/service/StudentService.java | 8 +- .../reading/platform/service/TaskService.java | 22 + .../service/impl/ClassServiceImpl.java | 56 +- .../service/impl/NotificationServiceImpl.java | 8 + .../service/impl/ParentAuthServiceImpl.java | 47 + .../service/impl/ParentChildServiceImpl.java | 149 + .../service/impl/ParentLessonServiceImpl.java | 81 + .../service/impl/StudentServiceImpl.java | 52 +- .../service/impl/TaskServiceImpl.java | 154 +- .../V45__add_task_completion_photos.sql | 8 + ...add_task_completion_submitted_reviewed.sql | 9 + 127 files changed, 6153 insertions(+), 1395 deletions(-) create mode 100644 reading-platform-frontend/src/api/generated/model/batchStudentRecordsRequest.ts create mode 100644 reading-platform-frontend/src/api/generated/model/childInfoResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/childProfileResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/classInfo.ts create mode 100644 reading-platform-frontend/src/api/generated/model/courseInfo.ts create mode 100644 reading-platform-frontend/src/api/generated/model/getAllCoursesParams.ts create mode 100644 reading-platform-frontend/src/api/generated/model/getChildLessonsParams.ts create mode 100644 reading-platform-frontend/src/api/generated/model/getStatisticsParams.ts create mode 100644 reading-platform-frontend/src/api/generated/model/getTaskCompletions1Params.ts create mode 100644 reading-platform-frontend/src/api/generated/model/getTaskCompletionsParams.ts create mode 100644 reading-platform-frontend/src/api/generated/model/getTaskListParams.ts create mode 100644 reading-platform-frontend/src/api/generated/model/growthRecordForParentResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/lessonInfo.ts create mode 100644 reading-platform-frontend/src/api/generated/model/lessonRecordResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/lessonTagResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/notificationForParentResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/pageResultGrowthRecordForParentResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/pageResultLessonRecordResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/pageResultNotificationForParentResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/pageResultSchoolCourseResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/pageResultTaskCompletionDetailResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/pageResultTaskWithCompletionResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultChildProfileResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultGrowthRecordForParentResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultListChildInfoResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultListGrowthRecordForParentResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultMapStringString.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultMapStringStringData.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultNotificationForParentResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultPageResultGrowthRecordForParentResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultPageResultLessonRecordResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultPageResultNotificationForParentResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultPageResultSchoolCourseResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultPageResultTaskCompletionDetailResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultPageResultTaskWithCompletionResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultSchoolCourseResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultStudentRecordsResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultTaskCompletionDetailResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/resultTaskFeedbackResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/schoolCourseResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/statsInfo.ts create mode 100644 reading-platform-frontend/src/api/generated/model/studentInfo.ts create mode 100644 reading-platform-frontend/src/api/generated/model/studentRecordsResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/studentWithRecordResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/taskCompleteRequest.ts create mode 100644 reading-platform-frontend/src/api/generated/model/taskCompletionDetailResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/taskFeedbackRequest.ts create mode 100644 reading-platform-frontend/src/api/generated/model/taskFeedbackResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/taskInfo.ts create mode 100644 reading-platform-frontend/src/api/generated/model/taskSubmitRequest.ts create mode 100644 reading-platform-frontend/src/api/generated/model/taskWithCompletionResponse.ts create mode 100644 reading-platform-frontend/src/api/generated/model/teacherResponseClassNames.ts create mode 100644 reading-platform-java/src/main/java/com/reading/platform/dto/request/TaskCompleteRequest.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/dto/response/ChildInfoResponse.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/dto/response/ChildProfileResponse.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/dto/response/ClassStudentsResponse.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/dto/response/GrowthRecordForParentResponse.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/dto/response/LessonRecordResponse.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/dto/response/NotificationForParentResponse.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/dto/response/TaskWithCompletionResponse.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/service/ParentAuthService.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/service/ParentChildService.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/service/ParentLessonService.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/service/impl/ParentAuthServiceImpl.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/service/impl/ParentChildServiceImpl.java create mode 100644 reading-platform-java/src/main/java/com/reading/platform/service/impl/ParentLessonServiceImpl.java create mode 100644 reading-platform-java/src/main/resources/db/migration/V45__add_task_completion_photos.sql create mode 100644 reading-platform-java/src/main/resources/db/migration/V46__add_task_completion_submitted_reviewed.sql diff --git a/reading-platform-frontend/openapi.json b/reading-platform-frontend/openapi.json index a442865..2ba265c 100644 --- a/reading-platform-frontend/openapi.json +++ b/reading-platform-frontend/openapi.json @@ -26,12 +26,8 @@ "description": "教师端课时 API" }, { - "name": "School - Task", - "description": "Task Management APIs for School" - }, - { - "name": "Parent - Task", - "description": "Task APIs for Parent" + "name": "学校端 - 阅读任务(只读)", + "description": "学校端阅读任务查看 API" }, { "name": "超管 - 系统设置", @@ -45,6 +41,10 @@ "name": "教师端 - 反馈管理", "description": "教师端反馈 API" }, + { + "name": "Parent - Growth Record", + "description": "Growth Record APIs for Parent (read-only)" + }, { "name": "School - Parent", "description": "Parent Management APIs for School" @@ -97,10 +97,6 @@ "name": "教师端 - 通知管理", "description": "教师端通知 API" }, - { - "name": "Parent - Growth Record", - "description": "Growth Record APIs for Parent" - }, { "name": "学校端 - 数据报告", "description": "School Report APIs" @@ -109,6 +105,10 @@ "name": "学校端 - 数据导出", "description": "School Export APIs" }, + { + "name": "家长端 - 任务管理", + "description": "家长端任务 API" + }, { "name": "教师端 - 统计数据", "description": "教师端统计数据 API" @@ -425,6 +425,208 @@ } } }, + "/api/v1/teacher/tasks/completions/{completionId}/feedback": { + "put": { + "tags": [ + "教师端 - 任务管理" + ], + "summary": "修改评价", + "operationId": "updateFeedback", + "parameters": [ + { + "name": "completionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskFeedbackRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultTaskFeedbackResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + }, + "post": { + "tags": [ + "教师端 - 任务管理" + ], + "summary": "提交评价", + "operationId": "submitFeedback", + "parameters": [ + { + "name": "completionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskFeedbackRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultTaskFeedbackResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, "/api/v1/teacher/task-templates/{id}": { "get": { "tags": [ @@ -1937,288 +2139,6 @@ } } }, - "/api/v1/school/tasks/{id}": { - "get": { - "tags": [ - "School - Task" - ], - "summary": "Get task by ID", - "operationId": "getTask_1", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultTaskResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - } - } - }, - "put": { - "tags": [ - "School - Task" - ], - "summary": "Update task", - "operationId": "updateTask_1", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TaskUpdateRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultTaskResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - } - } - }, - "delete": { - "tags": [ - "School - Task" - ], - "summary": "Delete task", - "operationId": "deleteTask_1", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - } - } - } - }, "/api/v1/school/task-templates/{id}": { "get": { "tags": [ @@ -4801,106 +4721,16 @@ } } }, - "/api/v1/parent/growth-records/{id}": { - "get": { - "tags": [ - "Parent - Growth Record" - ], - "summary": "Get growth record by ID", - "operationId": "getGrowthRecord_2", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultGrowthRecordResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - } - } - }, + "/api/v1/parent/tasks/{taskId}/submit": { "put": { "tags": [ - "Parent - Growth Record" + "家长端 - 任务管理" ], - "summary": "Update growth record", - "operationId": "updateGrowthRecord_2", + "summary": "修改任务提交", + "operationId": "updateSubmission", "parameters": [ { - "name": "id", + "name": "taskId", "in": "path", "required": true, "schema": { @@ -4913,7 +4743,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GrowthRecordUpdateRequest" + "$ref": "#/components/schemas/TaskSubmitRequest" } } }, @@ -4925,7 +4755,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultGrowthRecordResponse" + "$ref": "#/components/schemas/ResultTaskCompletionDetailResponse" } } } @@ -4992,15 +4822,15 @@ } } }, - "delete": { + "post": { "tags": [ - "Parent - Growth Record" + "家长端 - 任务管理" ], - "summary": "Delete growth record", - "operationId": "deleteGrowthRecord_2", + "summary": "提交任务完成", + "operationId": "submitTask", "parameters": [ { - "name": "id", + "name": "taskId", "in": "path", "required": true, "schema": { @@ -5009,13 +4839,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskSubmitRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultVoid" + "$ref": "#/components/schemas/ResultTaskCompletionDetailResponse" } } } @@ -8829,6 +8669,14 @@ "type": "string" } }, + { + "name": "taskType", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "status", "in": "query", @@ -9036,6 +8884,14 @@ "schema": { "type": "string" } + }, + { + "name": "keyword", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -10026,10 +9882,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StudentRecordRequest" - } + "$ref": "#/components/schemas/BatchStudentRecordsRequest" } } }, @@ -10297,7 +10150,7 @@ "教师端 - 课时管理" ], "summary": "提交课时反馈", - "operationId": "submitFeedback", + "operationId": "submitFeedback_1", "parameters": [ { "name": "id", @@ -11194,14 +11047,6 @@ "type": "integer", "format": "int64" } - }, - { - "name": "newPassword", - "in": "query", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -11210,223 +11055,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - } - } - } - }, - "/api/v1/school/tasks": { - "get": { - "tags": [ - "School - Task" - ], - "summary": "Get task page", - "operationId": "getTaskPage_1", - "parameters": [ - { - "name": "pageNum", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - }, - { - "name": "pageSize", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - }, - { - "name": "keyword", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "status", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultPageResultTaskResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - } - } - }, - "post": { - "tags": [ - "School - Task" - ], - "summary": "Create task", - "operationId": "createTask_1", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TaskCreateRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultTaskResponse" + "$ref": "#/components/schemas/ResultMapStringString" } } } @@ -11529,6 +11158,22 @@ "schema": { "type": "string" } + }, + { + "name": "taskType", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "keyword", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -13915,9 +13560,9 @@ "/api/v1/parent/tasks/{id}/complete": { "post": { "tags": [ - "Parent - Task" + "家长端 - 任务管理" ], - "summary": "Complete task", + "summary": "完成任务(旧接口,兼容使用,支持 JSON body)", "operationId": "completeTask", "parameters": [ { @@ -13932,7 +13577,7 @@ { "name": "studentId", "in": "query", - "required": true, + "required": false, "schema": { "type": "integer", "format": "int64" @@ -13955,6 +13600,15 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskCompleteRequest" + } + } + } + }, "responses": { "200": { "description": "OK", @@ -14202,97 +13856,6 @@ } } }, - "/api/v1/parent/growth-records": { - "post": { - "tags": [ - "Parent - Growth Record" - ], - "summary": "Create growth record", - "operationId": "createGrowthRecord_2", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GrowthRecordCreateRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultGrowthRecordResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "405": { - "description": "Method Not Allowed", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/ResultVoid" - } - } - } - } - } - } - }, "/api/v1/imm/token/refresh": { "post": { "tags": [ @@ -17699,6 +17262,218 @@ } } }, + "/api/v1/teacher/tasks/{taskId}/completions": { + "get": { + "tags": [ + "教师端 - 任务管理" + ], + "summary": "获取任务完成情况列表", + "operationId": "getTaskCompletions", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "pageNum", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResultTaskCompletionDetailResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/api/v1/teacher/tasks/completions/{completionId}": { + "get": { + "tags": [ + "教师端 - 任务管理" + ], + "summary": "获取提交详情", + "operationId": "getCompletionDetail", + "parameters": [ + { + "name": "completionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultTaskCompletionDetailResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, "/api/v1/teacher/task-templates/default/{type}": { "get": { "tags": [ @@ -18473,7 +18248,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultListStudentRecordResponse" + "$ref": "#/components/schemas/ResultStudentRecordsResponse" } } } @@ -19017,7 +18792,23 @@ } }, { - "name": "category", + "name": "grade", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "domain", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "lessonType", "in": "query", "required": false, "schema": { @@ -19198,6 +18989,32 @@ ], "summary": "获取所有课程", "operationId": "getAllCourses", + "parameters": [ + { + "name": "keyword", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "grade", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "domain", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -20301,7 +20118,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultTimetableResponse" + "$ref": "#/components/schemas/ResultMapStringObject" } } } @@ -20904,6 +20721,616 @@ } } }, + "/api/v1/school/reading-tasks": { + "get": { + "tags": [ + "学校端 - 阅读任务(只读)" + ], + "summary": "获取任务列表(支持多维度筛选)", + "operationId": "getTaskList", + "parameters": [ + { + "name": "pageNum", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "keyword", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "classIds", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "teacherIds", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "dateType", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "startDate", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "endDate", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "completionRate", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortBy", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResultTaskResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/api/v1/school/reading-tasks/{taskId}": { + "get": { + "tags": [ + "学校端 - 阅读任务(只读)" + ], + "summary": "获取任务详情", + "operationId": "getTaskDetail", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultTaskResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/api/v1/school/reading-tasks/{taskId}/completions": { + "get": { + "tags": [ + "学校端 - 阅读任务(只读)" + ], + "summary": "获取任务完成情况列表", + "operationId": "getTaskCompletions_1", + "parameters": [ + { + "name": "taskId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "pageNum", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResultTaskCompletionDetailResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/api/v1/school/reading-tasks/statistics": { + "get": { + "tags": [ + "学校端 - 阅读任务(只读)" + ], + "summary": "获取统计数据", + "operationId": "getStatistics", + "parameters": [ + { + "name": "dateType", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "startDate", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "endDate", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultObject" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/api/v1/school/reading-tasks/completions/{completionId}": { + "get": { + "tags": [ + "学校端 - 阅读任务(只读)" + ], + "summary": "获取学生提交详情", + "operationId": "getCompletionDetail_1", + "parameters": [ + { + "name": "completionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultTaskCompletionDetailResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, "/api/v1/school/parents/{id}/children": { "get": { "tags": [ @@ -22345,7 +22772,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultPageResultCourseResponse" + "$ref": "#/components/schemas/ResultPageResultSchoolCourseResponse" } } } @@ -22437,7 +22864,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultCoursePackage" + "$ref": "#/components/schemas/ResultSchoolCourseResponse" } } } @@ -22508,9 +22935,9 @@ "/api/v1/parent/tasks": { "get": { "tags": [ - "Parent - Task" + "家长端 - 任务管理" ], - "summary": "Get my tasks", + "summary": "获取我的任务列表(聚合多孩子任务)", "operationId": "getMyTasks", "parameters": [ { @@ -22548,7 +22975,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultPageResultTaskResponse" + "$ref": "#/components/schemas/ResultPageResultTaskWithCompletionResponse" } } } @@ -22619,10 +23046,10 @@ "/api/v1/parent/tasks/{id}": { "get": { "tags": [ - "Parent - Task" + "家长端 - 任务管理" ], - "summary": "Get task by ID", - "operationId": "getTask_2", + "summary": "获取任务详情", + "operationId": "getTask_1", "parameters": [ { "name": "id", @@ -22711,9 +23138,9 @@ "/api/v1/parent/tasks/student/{studentId}": { "get": { "tags": [ - "Parent - Task" + "家长端 - 任务管理" ], - "summary": "Get tasks by student ID", + "summary": "获取孩子的任务列表(含完成信息与教师评价)", "operationId": "getTasksByStudent", "parameters": [ { @@ -22760,7 +23187,191 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultPageResultTaskResponse" + "$ref": "#/components/schemas/ResultPageResultTaskWithCompletionResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/api/v1/parent/tasks/completions/{completionId}": { + "get": { + "tags": [ + "家长端 - 任务管理" + ], + "summary": "获取提交详情", + "operationId": "getCompletionDetail_2", + "parameters": [ + { + "name": "completionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultTaskCompletionDetailResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/api/v1/parent/tasks/completions/{completionId}/feedback": { + "get": { + "tags": [ + "家长端 - 任务管理" + ], + "summary": "获取教师评价", + "operationId": "getFeedback", + "parameters": [ + { + "name": "completionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultTaskFeedbackResponse" } } } @@ -22864,6 +23475,14 @@ "type": "integer", "format": "int32" } + }, + { + "name": "notificationType", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -22872,7 +23491,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultPageResultNotificationResponse" + "$ref": "#/components/schemas/ResultPageResultNotificationForParentResponse" } } } @@ -22964,7 +23583,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultNotificationResponse" + "$ref": "#/components/schemas/ResultNotificationForParentResponse" } } } @@ -23113,6 +23732,98 @@ } } }, + "/api/v1/parent/growth-records/{id}": { + "get": { + "tags": [ + "Parent - Growth Record" + ], + "summary": "Get growth record by ID", + "operationId": "getGrowthRecord_2", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultGrowthRecordForParentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, "/api/v1/parent/growth-records/student/{studentId}": { "get": { "tags": [ @@ -23165,7 +23876,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultPageResultGrowthRecordResponse" + "$ref": "#/components/schemas/ResultPageResultGrowthRecordForParentResponse" } } } @@ -23267,7 +23978,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultListGrowthRecordResponse" + "$ref": "#/components/schemas/ResultListGrowthRecordForParentResponse" } } } @@ -23348,7 +24059,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultListStudentResponse" + "$ref": "#/components/schemas/ResultListChildInfoResponse" } } } @@ -23440,7 +24151,119 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/ResultStudentResponse" + "$ref": "#/components/schemas/ResultChildProfileResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/api/v1/parent/children/{id}/lessons": { + "get": { + "tags": [ + "Parent - Child" + ], + "summary": "Get child lesson records (reading history)", + "operationId": "getChildLessons", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "pageNum", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResultLessonRecordResponse" } } } @@ -25128,6 +25951,24 @@ "type": "string", "description": "任务类型" }, + "taskType": { + "type": "string", + "description": "任务类型(前端兼容 taskType)" + }, + "relatedBookName": { + "type": "string", + "description": "关联绘本名称" + }, + "courseId": { + "type": "integer", + "description": "课程 ID", + "format": "int64" + }, + "relatedCourseId": { + "type": "integer", + "description": "课程 ID(前端兼容 relatedCourseId)", + "format": "int64" + }, "startDate": { "type": "string", "description": "开始日期", @@ -25145,6 +25986,19 @@ "attachments": { "type": "string", "description": "附件(JSON 数组)" + }, + "targetType": { + "type": "string", + "description": "目标类型:CLASS-班级,STUDENT-学生" + }, + "targetIds": { + "type": "array", + "description": "目标 IDs", + "items": { + "type": "integer", + "description": "目标 IDs", + "format": "int64" + } } }, "description": "任务更新请求" @@ -25189,6 +26043,10 @@ "type": "string", "description": "任务类型" }, + "relatedBookName": { + "type": "string", + "description": "关联绘本名称" + }, "courseId": { "type": "integer", "description": "课程 ID", @@ -25221,6 +26079,19 @@ "type": "string", "description": "附件" }, + "targetType": { + "type": "string", + "description": "目标类型:CLASS-班级,STUDENT-学生" + }, + "targetIds": { + "type": "array", + "description": "目标 IDs(班级或学生)", + "items": { + "type": "integer", + "description": "目标 IDs(班级或学生)", + "format": "int64" + } + }, "createdAt": { "type": "string", "description": "创建时间", @@ -25234,6 +26105,98 @@ }, "description": "任务响应" }, + "TaskFeedbackRequest": { + "required": [ + "result" + ], + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "评价结果:EXCELLENT-优秀/PASSED-通过/NEEDS_WORK-需改进" + }, + "rating": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "description": "评分 1-5(可选)", + "format": "int32" + }, + "comment": { + "maxLength": 500, + "minLength": 0, + "type": "string", + "description": "评语" + } + }, + "description": "任务评价请求" + }, + "ResultTaskFeedbackResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/TaskFeedbackResponse" + } + } + }, + "TaskFeedbackResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "评价ID", + "format": "int64" + }, + "completionId": { + "type": "integer", + "description": "完成记录ID", + "format": "int64" + }, + "result": { + "type": "string", + "description": "评价结果:EXCELLENT/PASSED/NEEDS_WORK" + }, + "resultText": { + "type": "string", + "description": "评价结果文本:优秀/通过/需改进" + }, + "rating": { + "type": "integer", + "description": "评分 1-5", + "format": "int32" + }, + "comment": { + "type": "string", + "description": "评语" + }, + "teacherId": { + "type": "integer", + "description": "教师ID", + "format": "int64" + }, + "teacherName": { + "type": "string", + "description": "教师姓名" + }, + "teacherAvatar": { + "type": "string", + "description": "教师头像" + }, + "createdAt": { + "type": "string", + "description": "评价时间", + "format": "date-time" + } + }, + "description": "任务评价响应" + }, "TaskTemplateCreateRequest": { "required": [ "name" @@ -25267,18 +26230,16 @@ "format": "int32" }, "isDefault": { - "type": "integer", - "description": "是否默认模板", - "format": "int32" + "type": "boolean", + "description": "是否默认模板" }, "content": { "type": "string", "description": "模板内容" }, "isPublic": { - "type": "integer", - "description": "是否公开", - "format": "int32" + "type": "boolean", + "description": "是否公开" } }, "description": "任务模板创建请求" @@ -25894,6 +26855,15 @@ "status": { "type": "string", "description": "状态" + }, + "classIds": { + "type": "array", + "description": "负责班级ID列表", + "items": { + "type": "integer", + "description": "负责班级ID列表", + "format": "int64" + } } }, "description": "教师更新请求" @@ -25926,10 +26896,6 @@ "description": "租户 ID", "format": "int64" }, - "username": { - "type": "string", - "description": "用户名" - }, "name": { "type": "string", "description": "姓名" @@ -25958,6 +26924,24 @@ "type": "string", "description": "状态" }, + "classIds": { + "type": "array", + "description": "负责班级ID列表", + "items": { + "type": "integer", + "description": "负责班级ID列表", + "format": "int64" + } + }, + "classNames": { + "type": "object", + "description": "负责班级名称" + }, + "lessonCount": { + "type": "integer", + "description": "授课次数", + "format": "int32" + }, "lastLoginAt": { "type": "string", "description": "最后登录时间", @@ -25972,6 +26956,10 @@ "type": "string", "description": "更新时间", "format": "date-time" + }, + "loginAccount": { + "type": "string", + "description": "登录账号" } }, "description": "教师响应" @@ -26638,6 +27626,165 @@ } } }, + "TaskSubmitRequest": { + "type": "object", + "properties": { + "studentId": { + "type": "integer", + "description": "学生ID", + "format": "int64" + }, + "photos": { + "maxItems": 9, + "minItems": 0, + "type": "array", + "description": "照片URL数组(最多9张)", + "items": { + "type": "string", + "description": "照片URL数组(最多9张)" + } + }, + "videoUrl": { + "type": "string", + "description": "视频URL" + }, + "audioUrl": { + "type": "string", + "description": "语音URL" + }, + "content": { + "maxLength": 1000, + "minLength": 0, + "type": "string", + "description": "阅读心得/完成内容" + } + }, + "description": "任务提交请求" + }, + "ClassInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "班级ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "班级名称" + }, + "grade": { + "type": "string", + "description": "年级" + } + }, + "description": "班级信息" + }, + "ResultTaskCompletionDetailResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/TaskCompletionDetailResponse" + } + } + }, + "StudentInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "学生ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "学生姓名" + }, + "avatar": { + "type": "string", + "description": "学生头像" + }, + "gender": { + "type": "string", + "description": "性别:MALE/FEMALE" + }, + "classInfo": { + "$ref": "#/components/schemas/ClassInfo" + } + }, + "description": "学生信息" + }, + "TaskCompletionDetailResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "完成记录ID", + "format": "int64" + }, + "taskId": { + "type": "integer", + "description": "任务ID", + "format": "int64" + }, + "taskTitle": { + "type": "string", + "description": "任务标题" + }, + "student": { + "$ref": "#/components/schemas/StudentInfo" + }, + "status": { + "type": "string", + "description": "状态:PENDING/SUBMITTED/REVIEWED" + }, + "statusText": { + "type": "string", + "description": "状态文本:待完成/已提交/已评价" + }, + "photos": { + "type": "array", + "description": "照片URL数组", + "items": { + "type": "string", + "description": "照片URL数组" + } + }, + "videoUrl": { + "type": "string", + "description": "视频URL" + }, + "audioUrl": { + "type": "string", + "description": "语音URL" + }, + "content": { + "type": "string", + "description": "完成内容/阅读心得" + }, + "submittedAt": { + "type": "string", + "description": "提交时间", + "format": "date-time" + }, + "reviewedAt": { + "type": "string", + "description": "评价时间", + "format": "date-time" + }, + "feedback": { + "$ref": "#/components/schemas/TaskFeedbackResponse" + } + }, + "description": "任务完成详情响应" + }, "ThemeCreateRequest": { "required": [ "name" @@ -26744,14 +27891,14 @@ "type": "string", "description": "状态" }, - "packageType": { - "type": "string", - "description": "套餐类型" - }, - "collectionId": { - "type": "integer", + "collectionIds": { + "type": "array", "description": "课程套餐ID(用于三层架构)", - "format": "int64" + "items": { + "type": "integer", + "description": "课程套餐ID(用于三层架构)", + "format": "int64" + } }, "teacherQuota": { "type": "integer", @@ -26850,9 +27997,13 @@ "description": "最大教师数", "format": "int32" }, - "packageType": { - "type": "string", - "description": "套餐类型" + "packageNames": { + "type": "array", + "description": "套餐名称列表", + "items": { + "type": "string", + "description": "套餐名称列表" + } }, "teacherQuota": { "type": "integer", @@ -27549,12 +28700,20 @@ "description": "评估数据" }, "gradeTags": { - "type": "string", - "description": "年级标签" + "type": "array", + "description": "年级标签(规范为数组,与套餐管理适用年级对齐)", + "items": { + "type": "string", + "description": "年级标签(规范为数组,与套餐管理适用年级对齐)" + } }, "domainTags": { - "type": "string", - "description": "领域标签" + "type": "array", + "description": "领域标签(规范为数组)", + "items": { + "type": "string", + "description": "领域标签(规范为数组)" + } }, "hasCollectiveLesson": { "type": "integer", @@ -27643,6 +28802,13 @@ "items": { "$ref": "#/components/schemas/CourseLessonResponse" } + }, + "lessonTags": { + "type": "array", + "description": "课程环节标签(列表展示用,仅 name 和 lessonType)", + "items": { + "$ref": "#/components/schemas/LessonTagResponse" + } } }, "description": "课程响应" @@ -27699,6 +28865,20 @@ }, "description": "教学环节响应" }, + "LessonTagResponse": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "环节名称" + }, + "lessonType": { + "type": "string", + "description": "环节类型:INTRODUCTION、COLLECTIVE、LANGUAGE、HEALTH、SCIENCE、SOCIAL、ART" + } + }, + "description": "课程环节标签" + }, "ResultCourseResponse": { "type": "object", "properties": { @@ -28062,11 +29242,24 @@ "type": "string", "description": "任务类型:reading-阅读,homework-作业,activity-活动" }, + "taskType": { + "type": "string", + "description": "任务类型(前端兼容 taskType)" + }, + "relatedBookName": { + "type": "string", + "description": "关联绘本名称(手动填写)" + }, "courseId": { "type": "integer", "description": "课程 ID", "format": "int64" }, + "relatedCourseId": { + "type": "integer", + "description": "课程 ID(前端兼容 relatedCourseId)", + "format": "int64" + }, "startDate": { "type": "string", "description": "开始日期", @@ -28077,6 +29270,11 @@ "description": "截止日期", "format": "date" }, + "endDate": { + "type": "string", + "description": "截止日期(前端兼容 endDate)", + "format": "date" + }, "attachments": { "type": "string", "description": "附件(JSON 数组)" @@ -28198,6 +29396,10 @@ "type": "string", "description": "任务类型" }, + "relatedBookName": { + "type": "string", + "description": "关联绘本名称" + }, "courseId": { "type": "integer", "description": "课程 ID", @@ -28488,6 +29690,22 @@ }, "description": "学生记录响应" }, + "BatchStudentRecordsRequest": { + "required": [ + "records" + ], + "type": "object", + "properties": { + "records": { + "type": "array", + "description": "记录列表", + "items": { + "$ref": "#/components/schemas/StudentRecordRequest" + } + } + }, + "description": "批量保存学生记录请求" + }, "ResultListStudentRecordResponse": { "type": "object", "properties": { @@ -28703,13 +29921,14 @@ "required": [ "name", "password", + "phone", "username" ], "type": "object", "properties": { "username": { "type": "string", - "description": "用户名" + "description": "用户名/登录账号" }, "password": { "type": "string", @@ -28734,10 +29953,37 @@ "bio": { "type": "string", "description": "简介" + }, + "classIds": { + "type": "array", + "description": "负责班级ID列表", + "items": { + "type": "integer", + "description": "负责班级ID列表", + "format": "int64" + } } }, "description": "教师创建请求" }, + "ResultMapStringString": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "StudentCreateRequest": { "required": [ "name" @@ -28994,6 +30240,28 @@ }, "description": "班级创建请求" }, + "TaskCompleteRequest": { + "required": [ + "studentId" + ], + "type": "object", + "properties": { + "studentId": { + "type": "integer", + "description": "学生ID", + "format": "int64" + }, + "content": { + "type": "string", + "description": "完成内容/反馈" + }, + "attachments": { + "type": "string", + "description": "附件" + } + }, + "description": "任务完成请求" + }, "RefreshTokenRequest": { "type": "object", "properties": { @@ -29174,10 +30442,6 @@ "type": "string", "description": "Logo URL" }, - "packageType": { - "type": "string", - "description": "套餐类型" - }, "teacherQuota": { "type": "integer", "description": "教师配额", @@ -29198,10 +30462,14 @@ "description": "结束日期", "format": "date" }, - "collectionId": { - "type": "integer", - "description": "课程套餐 ID(可选)", - "format": "int64" + "collectionIds": { + "type": "array", + "description": "课程套餐 ID 列表(可选,支持多选)", + "items": { + "type": "integer", + "description": "课程套餐 ID 列表(可选,支持多选)", + "format": "int64" + } } }, "description": "租户创建请求" @@ -29652,6 +30920,48 @@ } } }, + "PageResultTaskCompletionDetailResponse": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskCompletionDetailResponse" + } + }, + "total": { + "type": "integer", + "format": "int64" + }, + "pageNum": { + "type": "integer", + "format": "int64" + }, + "pageSize": { + "type": "integer", + "format": "int64" + }, + "pages": { + "type": "integer", + "format": "int64" + } + } + }, + "ResultPageResultTaskCompletionDetailResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/PageResultTaskCompletionDetailResponse" + } + } + }, "PageResultTaskTemplateResponse": { "type": "object", "properties": { @@ -30294,6 +31604,10 @@ "course": { "$ref": "#/components/schemas/CourseResponse" }, + "lessonType": { + "type": "string", + "description": "排课选择的课程类型(子课程模式时用于直接进入对应子课程)" + }, "class": { "$ref": "#/components/schemas/ClassResponse" } @@ -30315,6 +31629,78 @@ } } }, + "LessonInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "课时 ID", + "format": "int64" + }, + "status": { + "type": "string", + "description": "状态" + }, + "className": { + "type": "string", + "description": "班级名称" + } + }, + "description": "课时简要信息" + }, + "ResultStudentRecordsResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/StudentRecordsResponse" + } + } + }, + "StudentRecordsResponse": { + "type": "object", + "properties": { + "lesson": { + "$ref": "#/components/schemas/LessonInfo" + }, + "students": { + "type": "array", + "description": "学生列表(含记录)", + "items": { + "$ref": "#/components/schemas/StudentWithRecordResponse" + } + } + }, + "description": "课后记录列表响应" + }, + "StudentWithRecordResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "学生 ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "学生姓名" + }, + "gender": { + "type": "string", + "description": "性别" + }, + "record": { + "$ref": "#/components/schemas/StudentRecordResponse" + } + }, + "description": "学生及其课后记录" + }, "ResultListLessonResponse": { "type": "object", "properties": { @@ -30651,21 +32037,6 @@ } } }, - "ResultTimetableResponse": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "data": { - "$ref": "#/components/schemas/TimetableResponse" - } - } - }, "LessonTypeInfo": { "type": "object", "properties": { @@ -30746,6 +32117,10 @@ "type": "string", "description": "课程包名称" }, + "lessonType": { + "type": "string", + "description": "课程类型代码 (如 DOMAIN_HEALTH)" + }, "lessonTypeName": { "type": "string", "description": "课程类型名称" @@ -31002,6 +32377,21 @@ } } }, + "ResultObject": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object" + } + } + }, "PageResultParentResponse": { "type": "object", "properties": { @@ -31535,7 +32925,34 @@ } } }, - "ResultCoursePackage": { + "PageResultSchoolCourseResponse": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchoolCourseResponse" + } + }, + "total": { + "type": "integer", + "format": "int64" + }, + "pageNum": { + "type": "integer", + "format": "int64" + }, + "pageSize": { + "type": "integer", + "format": "int64" + }, + "pages": { + "type": "integer", + "format": "int64" + } + } + }, + "ResultPageResultSchoolCourseResponse": { "type": "object", "properties": { "code": { @@ -31546,7 +32963,118 @@ "type": "string" }, "data": { - "$ref": "#/components/schemas/CoursePackage" + "$ref": "#/components/schemas/PageResultSchoolCourseResponse" + } + } + }, + "SchoolCourseResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID", + "format": "int64" + }, + "tenantId": { + "type": "integer", + "description": "租户 ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "课程名称" + }, + "code": { + "type": "string", + "description": "课程编码" + }, + "description": { + "type": "string", + "description": "描述" + }, + "pictureBookName": { + "type": "string", + "description": "绘本名称" + }, + "coverImagePath": { + "type": "string", + "description": "封面图片路径" + }, + "coverUrl": { + "type": "string", + "description": "封面 URL" + }, + "gradeTags": { + "type": "array", + "description": "年级标签(规范为数组)", + "items": { + "type": "string", + "description": "年级标签(规范为数组)" + } + }, + "domainTags": { + "type": "array", + "description": "领域标签(规范为数组)", + "items": { + "type": "string", + "description": "领域标签(规范为数组)" + } + }, + "duration": { + "type": "integer", + "description": "课程时长(分钟)", + "format": "int32" + }, + "usageCount": { + "type": "integer", + "description": "使用次数", + "format": "int32" + }, + "teacherCount": { + "type": "integer", + "description": "教师数量", + "format": "int32" + }, + "avgRating": { + "type": "number", + "description": "平均评分" + }, + "status": { + "type": "string", + "description": "状态" + }, + "createdAt": { + "type": "string", + "description": "创建时间", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "description": "更新时间", + "format": "date-time" + }, + "lessonTags": { + "type": "array", + "description": "课程环节标签(列表展示用,仅 name 和 lessonType)", + "items": { + "$ref": "#/components/schemas/LessonTagResponse" + } + } + }, + "description": "学校端课程响应" + }, + "ResultSchoolCourseResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/SchoolCourseResponse" } } }, @@ -31640,74 +33168,28 @@ } } }, - "NotificationResponse": { + "CourseInfo": { "type": "object", "properties": { "id": { "type": "integer", - "description": "ID", + "description": "课程ID", "format": "int64" }, - "tenantId": { - "type": "integer", - "description": "租户 ID", - "format": "int64" - }, - "title": { + "name": { "type": "string", - "description": "标题" - }, - "content": { - "type": "string", - "description": "内容" - }, - "type": { - "type": "string", - "description": "类型" - }, - "senderId": { - "type": "integer", - "description": "发送人 ID", - "format": "int64" - }, - "senderRole": { - "type": "string", - "description": "发送人角色" - }, - "recipientType": { - "type": "string", - "description": "接收者类型" - }, - "recipientId": { - "type": "integer", - "description": "接收者 ID", - "format": "int64" - }, - "isRead": { - "type": "integer", - "description": "是否已读", - "format": "int32" - }, - "readAt": { - "type": "string", - "description": "阅读时间", - "format": "date-time" - }, - "createdAt": { - "type": "string", - "description": "创建时间", - "format": "date-time" + "description": "课程名称" } }, - "description": "通知响应" + "description": "关联课程信息" }, - "PageResultNotificationResponse": { + "PageResultTaskWithCompletionResponse": { "type": "object", "properties": { "list": { "type": "array", "items": { - "$ref": "#/components/schemas/NotificationResponse" + "$ref": "#/components/schemas/TaskWithCompletionResponse" } }, "total": { @@ -31728,7 +33210,7 @@ } } }, - "ResultPageResultNotificationResponse": { + "ResultPageResultTaskWithCompletionResponse": { "type": "object", "properties": { "code": { @@ -31739,11 +33221,166 @@ "type": "string" }, "data": { - "$ref": "#/components/schemas/PageResultNotificationResponse" + "$ref": "#/components/schemas/PageResultTaskWithCompletionResponse" } } }, - "ResultNotificationResponse": { + "TaskInfo": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "任务ID", + "format": "int64" + }, + "title": { + "type": "string", + "description": "任务标题" + }, + "description": { + "type": "string", + "description": "任务描述" + }, + "taskType": { + "type": "string", + "description": "任务类型" + }, + "startDate": { + "type": "string", + "description": "开始日期", + "format": "date" + }, + "endDate": { + "type": "string", + "description": "截止日期", + "format": "date" + }, + "relatedBookName": { + "type": "string", + "description": "关联绘本名称" + }, + "course": { + "$ref": "#/components/schemas/CourseInfo" + } + }, + "description": "任务基本信息" + }, + "TaskWithCompletionResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "任务ID", + "format": "int64" + }, + "status": { + "type": "string", + "description": "完成状态:PENDING-待提交/SUBMITTED-已提交/REVIEWED-已评价" + }, + "submittedAt": { + "type": "string", + "description": "提交时间", + "format": "date-time" + }, + "reviewedAt": { + "type": "string", + "description": "评价时间", + "format": "date-time" + }, + "photos": { + "type": "array", + "description": "照片URL列表", + "items": { + "type": "string", + "description": "照片URL列表" + } + }, + "videoUrl": { + "type": "string", + "description": "视频URL" + }, + "audioUrl": { + "type": "string", + "description": "语音URL" + }, + "content": { + "type": "string", + "description": "阅读心得/完成内容" + }, + "teacherFeedback": { + "$ref": "#/components/schemas/TaskFeedbackResponse" + }, + "task": { + "$ref": "#/components/schemas/TaskInfo" + } + }, + "description": "家长端任务列表响应(含完成信息)" + }, + "NotificationForParentResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID", + "format": "int64" + }, + "title": { + "type": "string", + "description": "标题" + }, + "content": { + "type": "string", + "description": "内容" + }, + "isRead": { + "type": "boolean", + "description": "是否已读" + }, + "readAt": { + "type": "string", + "description": "阅读时间", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "description": "创建时间", + "format": "date-time" + }, + "notificationType": { + "type": "string", + "description": "通知类型" + } + }, + "description": "家长端通知响应" + }, + "PageResultNotificationForParentResponse": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationForParentResponse" + } + }, + "total": { + "type": "integer", + "format": "int64" + }, + "pageNum": { + "type": "integer", + "format": "int64" + }, + "pageSize": { + "type": "integer", + "format": "int64" + }, + "pages": { + "type": "integer", + "format": "int64" + } + } + }, + "ResultPageResultNotificationForParentResponse": { "type": "object", "properties": { "code": { @@ -31754,11 +33391,127 @@ "type": "string" }, "data": { - "$ref": "#/components/schemas/NotificationResponse" + "$ref": "#/components/schemas/PageResultNotificationForParentResponse" } } }, - "ResultListGrowthRecordResponse": { + "ResultNotificationForParentResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/NotificationForParentResponse" + } + } + }, + "GrowthRecordForParentResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID", + "format": "int64" + }, + "title": { + "type": "string", + "description": "标题" + }, + "content": { + "type": "string", + "description": "内容" + }, + "images": { + "type": "array", + "description": "图片URL列表", + "items": { + "type": "string", + "description": "图片URL列表" + } + }, + "recordDate": { + "type": "string", + "description": "记录日期", + "format": "date" + }, + "recordType": { + "type": "string", + "description": "记录类型" + }, + "createdAt": { + "type": "string", + "description": "创建时间", + "format": "date-time" + }, + "class": { + "$ref": "#/components/schemas/ClassInfo" + } + }, + "description": "家长端成长档案响应" + }, + "ResultGrowthRecordForParentResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/GrowthRecordForParentResponse" + } + } + }, + "PageResultGrowthRecordForParentResponse": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GrowthRecordForParentResponse" + } + }, + "total": { + "type": "integer", + "format": "int64" + }, + "pageNum": { + "type": "integer", + "format": "int64" + }, + "pageSize": { + "type": "integer", + "format": "int64" + }, + "pages": { + "type": "integer", + "format": "int64" + } + } + }, + "ResultPageResultGrowthRecordForParentResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/PageResultGrowthRecordForParentResponse" + } + } + }, + "ResultListGrowthRecordForParentResponse": { "type": "object", "properties": { "code": { @@ -31771,12 +33524,53 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GrowthRecordResponse" + "$ref": "#/components/schemas/GrowthRecordForParentResponse" } } } }, - "ResultListStudentResponse": { + "ChildInfoResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "学生ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "姓名" + }, + "gender": { + "type": "string", + "description": "性别" + }, + "birthDate": { + "type": "string", + "description": "出生日期", + "format": "date" + }, + "relationship": { + "type": "string", + "description": "与家长关系:FATHER/MOTHER/GRANDFATHER/GRANDMOTHER/OTHER" + }, + "readingCount": { + "type": "integer", + "description": "阅读次数(student_record 数量)", + "format": "int32" + }, + "lessonCount": { + "type": "integer", + "description": "上课次数(lesson 记录数)", + "format": "int32" + }, + "class": { + "$ref": "#/components/schemas/ClassInfo" + } + }, + "description": "家长端孩子列表响应" + }, + "ResultListChildInfoResponse": { "type": "object", "properties": { "code": { @@ -31789,12 +33583,56 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/StudentResponse" + "$ref": "#/components/schemas/ChildInfoResponse" } } } }, - "ResultObject": { + "ChildProfileResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "学生ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "姓名" + }, + "gender": { + "type": "string", + "description": "性别" + }, + "birthDate": { + "type": "string", + "description": "出生日期", + "format": "date" + }, + "relationship": { + "type": "string", + "description": "与家长关系" + }, + "readingCount": { + "type": "integer", + "description": "阅读次数", + "format": "int32" + }, + "lessonCount": { + "type": "integer", + "description": "上课次数", + "format": "int32" + }, + "stats": { + "$ref": "#/components/schemas/StatsInfo" + }, + "class": { + "$ref": "#/components/schemas/ClassInfo" + } + }, + "description": "家长端孩子详情响应" + }, + "ResultChildProfileResponse": { "type": "object", "properties": { "code": { @@ -31805,7 +33643,113 @@ "type": "string" }, "data": { - "type": "object" + "$ref": "#/components/schemas/ChildProfileResponse" + } + } + }, + "StatsInfo": { + "type": "object", + "properties": { + "lessonRecords": { + "type": "integer", + "description": "阅读记录数", + "format": "int32" + }, + "growthRecords": { + "type": "integer", + "description": "成长档案数", + "format": "int32" + }, + "taskCompletions": { + "type": "integer", + "description": "任务完成数", + "format": "int32" + } + }, + "description": "统计信息" + }, + "LessonRecordResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "记录ID(student_record.id)", + "format": "int64" + }, + "lesson": { + "$ref": "#/components/schemas/LessonInfo" + }, + "focus": { + "type": "integer", + "description": "专注度评分", + "format": "int32" + }, + "participation": { + "type": "integer", + "description": "参与度评分", + "format": "int32" + }, + "interest": { + "type": "integer", + "description": "兴趣度评分", + "format": "int32" + }, + "understanding": { + "type": "integer", + "description": "理解度评分", + "format": "int32" + }, + "notes": { + "type": "string", + "description": "备注" + }, + "createdAt": { + "type": "string", + "description": "创建时间", + "format": "date-time" + } + }, + "description": "家长端阅读记录响应" + }, + "PageResultLessonRecordResponse": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LessonRecordResponse" + } + }, + "total": { + "type": "integer", + "format": "int64" + }, + "pageNum": { + "type": "integer", + "format": "int64" + }, + "pageSize": { + "type": "integer", + "format": "int64" + }, + "pages": { + "type": "integer", + "format": "int64" + } + } + }, + "ResultPageResultLessonRecordResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/PageResultLessonRecordResponse" } } }, @@ -32375,6 +34319,10 @@ "type": "string", "description": "状态" }, + "gradeTags": { + "type": "string", + "description": "年级(支持多个,逗号分隔)" + }, "reviewOnly": { "type": "boolean", "description": "是否仅查询待审核", @@ -32437,6 +34385,10 @@ "status": { "type": "string", "description": "状态" + }, + "gradeLevels": { + "type": "string", + "description": "年级(支持多个,逗号分隔)" } }, "description": "课程套餐分页查询请求" diff --git a/reading-platform-frontend/src/api/generated/index.ts b/reading-platform-frontend/src/api/generated/index.ts index 921d6e7..f263c1a 100644 --- a/reading-platform-frontend/src/api/generated/index.ts +++ b/reading-platform-frontend/src/api/generated/index.ts @@ -7,6 +7,7 @@ */ import type { BasicSettingsUpdateRequest, + BatchStudentRecordsRequest, BindStudentParams, ChangePasswordParams, CheckConflictParams, @@ -29,8 +30,10 @@ import type { GenerateReadOnlyTokenParams, GetActiveTeachersParams, GetActiveTenantsParams, + GetAllCoursesParams, GetAllStudentsParams, GetCalendarViewDataParams, + GetChildLessonsParams, GetClassPageParams, GetClassStudents1Params, GetClassStudentsParams, @@ -57,8 +60,11 @@ import type { GetSchedules1Params, GetSchedulesParams, GetSchoolCoursesParams, + GetStatisticsParams, GetStudentPageParams, - GetTaskPage1Params, + GetTaskCompletions1Params, + GetTaskCompletionsParams, + GetTaskListParams, GetTaskPageParams, GetTasksByStudentParams, GetTeacherPageParams, @@ -82,7 +88,6 @@ import type { RefreshTokenRequest, RenewRequest, ResetPassword1Params, - ResetPasswordParams, ResourceItemCreateRequest, ResourceItemUpdateRequest, ResourceLibraryCreateRequest, @@ -95,7 +100,10 @@ import type { StudentCreateRequest, StudentRecordRequest, StudentUpdateRequest, + TaskCompleteRequest, TaskCreateRequest, + TaskFeedbackRequest, + TaskSubmitRequest, TaskTemplateCreateRequest, TaskUpdateRequest, TeacherCreateRequest, @@ -162,6 +170,38 @@ const deleteTask = ( ); } +/** + * @summary 修改评价 + */ +const updateFeedback = ( + completionId: number, + taskFeedbackRequest: TaskFeedbackRequest, + ) => { + return customMutator( + {url: `/v1/teacher/tasks/completions/${completionId}/feedback`, method: 'PUT', + headers: {'Content-Type': 'application/json', }, + data: taskFeedbackRequest, + responseType: 'blob' + }, + ); + } + +/** + * @summary 提交评价 + */ +const submitFeedback = ( + completionId: number, + taskFeedbackRequest: TaskFeedbackRequest, + ) => { + return customMutator( + {url: `/v1/teacher/tasks/completions/${completionId}/feedback`, method: 'POST', + headers: {'Content-Type': 'application/json', }, + data: taskFeedbackRequest, + responseType: 'blob' + }, + ); + } + /** * @summary 获取模板详情 */ @@ -388,48 +428,6 @@ const deleteTeacher = ( ); } -/** - * @summary Get task by ID - */ -const getTask1 = ( - id: number, - ) => { - return customMutator( - {url: `/v1/school/tasks/${id}`, method: 'GET', - responseType: 'blob' - }, - ); - } - -/** - * @summary Update task - */ -const updateTask1 = ( - id: number, - taskUpdateRequest: TaskUpdateRequest, - ) => { - return customMutator( - {url: `/v1/school/tasks/${id}`, method: 'PUT', - headers: {'Content-Type': 'application/json', }, - data: taskUpdateRequest, - responseType: 'blob' - }, - ); - } - -/** - * @summary Delete task - */ -const deleteTask1 = ( - id: number, - ) => { - return customMutator( - {url: `/v1/school/tasks/${id}`, method: 'DELETE', - responseType: 'blob' - }, - ); - } - /** * @summary 获取模板详情 */ @@ -826,42 +824,32 @@ const removeClassTeacher = ( } /** - * @summary Get growth record by ID + * @summary 修改任务提交 */ -const getGrowthRecord2 = ( - id: number, +const updateSubmission = ( + taskId: number, + taskSubmitRequest: TaskSubmitRequest, ) => { return customMutator( - {url: `/v1/parent/growth-records/${id}`, method: 'GET', - responseType: 'blob' - }, - ); - } - -/** - * @summary Update growth record - */ -const updateGrowthRecord2 = ( - id: number, - growthRecordUpdateRequest: GrowthRecordUpdateRequest, - ) => { - return customMutator( - {url: `/v1/parent/growth-records/${id}`, method: 'PUT', + {url: `/v1/parent/tasks/${taskId}/submit`, method: 'PUT', headers: {'Content-Type': 'application/json', }, - data: growthRecordUpdateRequest, + data: taskSubmitRequest, responseType: 'blob' }, ); } /** - * @summary Delete growth record + * @summary 提交任务完成 */ -const deleteGrowthRecord2 = ( - id: number, +const submitTask = ( + taskId: number, + taskSubmitRequest: TaskSubmitRequest, ) => { return customMutator( - {url: `/v1/parent/growth-records/${id}`, method: 'DELETE', + {url: `/v1/parent/tasks/${taskId}/submit`, method: 'POST', + headers: {'Content-Type': 'application/json', }, + data: taskSubmitRequest, responseType: 'blob' }, ); @@ -1610,12 +1598,12 @@ const saveStudentRecord = ( */ const batchSaveStudentRecords = ( id: number, - studentRecordRequest: StudentRecordRequest[], + batchStudentRecordsRequest: BatchStudentRecordsRequest, ) => { return customMutator( {url: `/v1/teacher/lessons/${id}/students/batch-records`, method: 'POST', headers: {'Content-Type': 'application/json', }, - data: studentRecordRequest, + data: batchStudentRecordsRequest, responseType: 'blob' }, ); @@ -1650,7 +1638,7 @@ const getLessonFeedback = ( /** * @summary 提交课时反馈 */ -const submitFeedback = ( +const submitFeedback1 = ( id: number, lessonFeedbackRequest: LessonFeedbackRequest, ) => { @@ -1778,40 +1766,9 @@ const createTeacher = ( */ const resetPassword = ( id: number, - params: ResetPasswordParams, ) => { return customMutator( {url: `/v1/school/teachers/${id}/reset-password`, method: 'POST', - params, - responseType: 'blob' - }, - ); - } - -/** - * @summary Get task page - */ -const getTaskPage1 = ( - params?: GetTaskPage1Params, - ) => { - return customMutator( - {url: `/v1/school/tasks`, method: 'GET', - params, - responseType: 'blob' - }, - ); - } - -/** - * @summary Create task - */ -const createTask1 = ( - taskCreateRequest: TaskCreateRequest, - ) => { - return customMutator( - {url: `/v1/school/tasks`, method: 'POST', - headers: {'Content-Type': 'application/json', }, - data: taskCreateRequest, responseType: 'blob' }, ); @@ -2157,14 +2114,17 @@ const assignStudents = ( } /** - * @summary Complete task + * @summary 完成任务(旧接口,兼容使用,支持 JSON body) */ const completeTask = ( id: number, - params: CompleteTaskParams, + taskCompleteRequest: TaskCompleteRequest, + params?: CompleteTaskParams, ) => { return customMutator( {url: `/v1/parent/tasks/${id}/complete`, method: 'POST', + headers: {'Content-Type': 'application/json', }, + data: taskCompleteRequest, params, responseType: 'blob' }, @@ -2197,21 +2157,6 @@ const markAllAsRead1 = ( ); } -/** - * @summary Create growth record - */ -const createGrowthRecord2 = ( - growthRecordCreateRequest: GrowthRecordCreateRequest, - ) => { - return customMutator( - {url: `/v1/parent/growth-records`, method: 'POST', - headers: {'Content-Type': 'application/json', }, - data: growthRecordCreateRequest, - responseType: 'blob' - }, - ); - } - /** * 当 Token 即将过期时刷新 * @summary 刷新 WebOffice Token @@ -2723,6 +2668,34 @@ const getTodayLessons = ( ); } +/** + * @summary 获取任务完成情况列表 + */ +const getTaskCompletions = ( + taskId: number, + params?: GetTaskCompletionsParams, + ) => { + return customMutator( + {url: `/v1/teacher/tasks/${taskId}/completions`, method: 'GET', + params, + responseType: 'blob' + }, + ); + } + +/** + * @summary 获取提交详情 + */ +const getCompletionDetail = ( + completionId: number, + ) => { + return customMutator( + {url: `/v1/teacher/tasks/completions/${completionId}`, method: 'GET', + responseType: 'blob' + }, + ); + } + /** * @summary 获取默认模板 */ @@ -2941,10 +2914,11 @@ const getCourse = ( * @summary 获取所有课程 */ const getAllCourses = ( - + params?: GetAllCoursesParams, ) => { return customMutator( {url: `/v1/teacher/courses/all`, method: 'GET', + params, responseType: 'blob' }, ); @@ -3191,6 +3165,75 @@ const getCourseReports = ( ); } +/** + * @summary 获取任务列表(支持多维度筛选) + */ +const getTaskList = ( + params?: GetTaskListParams, + ) => { + return customMutator( + {url: `/v1/school/reading-tasks`, method: 'GET', + params, + responseType: 'blob' + }, + ); + } + +/** + * @summary 获取任务详情 + */ +const getTaskDetail = ( + taskId: number, + ) => { + return customMutator( + {url: `/v1/school/reading-tasks/${taskId}`, method: 'GET', + responseType: 'blob' + }, + ); + } + +/** + * @summary 获取任务完成情况列表 + */ +const getTaskCompletions1 = ( + taskId: number, + params?: GetTaskCompletions1Params, + ) => { + return customMutator( + {url: `/v1/school/reading-tasks/${taskId}/completions`, method: 'GET', + params, + responseType: 'blob' + }, + ); + } + +/** + * @summary 获取统计数据 + */ +const getStatistics = ( + params?: GetStatisticsParams, + ) => { + return customMutator( + {url: `/v1/school/reading-tasks/statistics`, method: 'GET', + params, + responseType: 'blob' + }, + ); + } + +/** + * @summary 获取学生提交详情 + */ +const getCompletionDetail1 = ( + completionId: number, + ) => { + return customMutator( + {url: `/v1/school/reading-tasks/completions/${completionId}`, method: 'GET', + responseType: 'blob' + }, + ); + } + /** * @summary Get children of parent */ @@ -3418,7 +3461,7 @@ const getSchoolCourse = ( } /** - * @summary Get my tasks + * @summary 获取我的任务列表(聚合多孩子任务) */ const getMyTasks = ( params?: GetMyTasksParams, @@ -3432,9 +3475,9 @@ const getMyTasks = ( } /** - * @summary Get task by ID + * @summary 获取任务详情 */ -const getTask2 = ( +const getTask1 = ( id: number, ) => { return customMutator( @@ -3445,7 +3488,7 @@ const getTask2 = ( } /** - * @summary Get tasks by student ID + * @summary 获取孩子的任务列表(含完成信息与教师评价) */ const getTasksByStudent = ( studentId: number, @@ -3459,6 +3502,32 @@ const getTasksByStudent = ( ); } +/** + * @summary 获取提交详情 + */ +const getCompletionDetail2 = ( + completionId: number, + ) => { + return customMutator( + {url: `/v1/parent/tasks/completions/${completionId}`, method: 'GET', + responseType: 'blob' + }, + ); + } + +/** + * @summary 获取教师评价 + */ +const getFeedback = ( + completionId: number, + ) => { + return customMutator( + {url: `/v1/parent/tasks/completions/${completionId}/feedback`, method: 'GET', + responseType: 'blob' + }, + ); + } + /** * @summary Get my notifications */ @@ -3499,6 +3568,19 @@ const getUnreadCount1 = ( ); } +/** + * @summary Get growth record by ID + */ +const getGrowthRecord2 = ( + id: number, + ) => { + return customMutator( + {url: `/v1/parent/growth-records/${id}`, method: 'GET', + responseType: 'blob' + }, + ); + } + /** * @summary Get growth records by student ID */ @@ -3555,6 +3637,21 @@ const getChild = ( ); } +/** + * @summary Get child lesson records (reading history) + */ +const getChildLessons = ( + id: number, + params?: GetChildLessonsParams, + ) => { + return customMutator( + {url: `/v1/parent/children/${id}/lessons`, method: 'GET', + params, + responseType: 'blob' + }, + ); + } + /** * @summary Get child growth records */ @@ -3800,10 +3897,12 @@ const deleteFile = ( ); } -return {getTask,updateTask,deleteTask,getTemplate,updateTemplate,deleteTemplate,getSchedule,updateSchedule,cancelSchedule,getLesson,updateLesson,getLessonProgress,saveLessonProgress,getGrowthRecord,updateGrowthRecord,deleteGrowthRecord,getTeacher,updateTeacher,deleteTeacher,getTask1,updateTask1,deleteTask1,getTemplate1,updateTemplate1,deleteTemplate1,getStudent,updateStudent,deleteStudent,getSettings,updateSettings,getSecuritySettings,updateSecuritySettings,getNotificationSettings,updateNotificationSettings,getBasicSettings,updateBasicSettings,getSchedule1,updateSchedule1,cancelSchedule1,getParent,updateParent,deleteParent,getGrowthRecord1,updateGrowthRecord1,deleteGrowthRecord1,getClass,updateClass,deleteClass,updateClassTeacher,removeClassTeacher,getGrowthRecord2,updateGrowthRecord2,deleteGrowthRecord2,findOne,update,_delete,reorder,getTenant,updateTenant,deleteTenant,updateTenantStatus,updateTenantQuota,getAllSettings,updateSettings1,getStorageSettings,updateStorageSettings,getSecuritySettings1,updateSecuritySettings1,getNotificationSettings1,updateNotificationSettings1,getBasicSettings1,updateBasicSettings1,findLibrary,updateLibrary,deleteLibrary,findItem,updateItem,deleteItem,getCourse1,updateCourse,deleteCourse,reorderSteps,findOne1,update1,delete1,updateStep,removeStep,reorder1,findOne2,update2,delete2,setPackages,getTaskPage,createTask,getTemplates,createTemplate,createFromTemplate,getSchedules,createSchedule,markAsRead,markAllAsRead,getMyLessons,createLesson,saveStudentRecord,batchSaveStudentRecords,startLesson,getLessonFeedback,submitFeedback,completeLesson,cancelLesson,createLessonFromSchedule,startLessonFromSchedule,getGrowthRecordPage,createGrowthRecord,getTeacherPage,createTeacher,resetPassword,getTaskPage1,createTask1,getTemplates1,createTemplate1,getStudentPage,createStudent,getSchedules1,createSchedule1,checkConflict,batchCreateSchedules,createSchedulesByClasses,getParentPage,createParent,bindStudent,unbindStudent,resetPassword1,renewCollection,getGrowthRecordPage1,createGrowthRecord1,getClassPage,createClass,getClassTeachers1,assignTeachers,getClassStudents1,assignStudents,completeTask,markAsRead1,markAllAsRead1,createGrowthRecord2,refreshToken,uploadFile,refreshToken1,logout,login,changePassword,findAll,create,getTenantPage,createTenant,resetTenantPassword,findAllLibraries,createLibrary,findAllItems,createItem,batchDeleteItems,getCoursePage1,createCourse,submitCourse,rejectCourse,publishCourse,archiveCourse,findAll1,create1,findSteps,createStep,page,create2,withdraw,submit,republish,reject,publish,archive,getWeeklyStats,getTodayLessons,getDefaultTemplate,getAllStudents,getTodaySchedules,getTimetable,getRecommendedCourses,getMyNotifications,getNotification,getUnreadCount,getStudentRecords,getTodayLessons1,getLessonTrend,getFeedbacks,getFeedbackStats,getDashboard,getCoursePage,getCourse,getAllCourses,getCourseUsage,getClasses,getClassTeachers,getClassStudents,getDefaultTemplate1,getSchoolStats,getActiveTeachers,getLessonTrend1,getCourseUsageStats,getCourseDistribution,getRecentActivities,getTimetable1,getCoursePackageLessonTypes,getCalendarViewData,getTeacherReports,getStudentReports,getOverview,getCourseReports,getParentChildren,findTenantCollections,getPackagesByCollection,getPackageCourses,getPackageInfo,getPackageUsage,getLogList,getLogDetail,getLogStats,getFeedbacks1,getFeedbackStats1,exportTeacherStats,exportStudentStats,exportLessons,exportGrowthRecords,getSchoolCourses,getSchoolCourse,getMyTasks,getTask2,getTasksByStudent,getMyNotifications1,getNotification1,getUnreadCount1,getGrowthRecordsByStudent,getRecentGrowthRecords,getMyChildren,getChild,getChildGrowth,generateEditToken,generateReadOnlyToken,getOssToken,getCurrentUser,getTenantStats,getAllActiveTenants,getStats,getTrendData,getActiveTenants,getPopularCourses,getRecentActivities1,getTenantDefaults,getStats1,getAllPublishedCourses,findByType,getAllPublishedCollections,deleteFile}}; +return {getTask,updateTask,deleteTask,updateFeedback,submitFeedback,getTemplate,updateTemplate,deleteTemplate,getSchedule,updateSchedule,cancelSchedule,getLesson,updateLesson,getLessonProgress,saveLessonProgress,getGrowthRecord,updateGrowthRecord,deleteGrowthRecord,getTeacher,updateTeacher,deleteTeacher,getTemplate1,updateTemplate1,deleteTemplate1,getStudent,updateStudent,deleteStudent,getSettings,updateSettings,getSecuritySettings,updateSecuritySettings,getNotificationSettings,updateNotificationSettings,getBasicSettings,updateBasicSettings,getSchedule1,updateSchedule1,cancelSchedule1,getParent,updateParent,deleteParent,getGrowthRecord1,updateGrowthRecord1,deleteGrowthRecord1,getClass,updateClass,deleteClass,updateClassTeacher,removeClassTeacher,updateSubmission,submitTask,findOne,update,_delete,reorder,getTenant,updateTenant,deleteTenant,updateTenantStatus,updateTenantQuota,getAllSettings,updateSettings1,getStorageSettings,updateStorageSettings,getSecuritySettings1,updateSecuritySettings1,getNotificationSettings1,updateNotificationSettings1,getBasicSettings1,updateBasicSettings1,findLibrary,updateLibrary,deleteLibrary,findItem,updateItem,deleteItem,getCourse1,updateCourse,deleteCourse,reorderSteps,findOne1,update1,delete1,updateStep,removeStep,reorder1,findOne2,update2,delete2,setPackages,getTaskPage,createTask,getTemplates,createTemplate,createFromTemplate,getSchedules,createSchedule,markAsRead,markAllAsRead,getMyLessons,createLesson,saveStudentRecord,batchSaveStudentRecords,startLesson,getLessonFeedback,submitFeedback1,completeLesson,cancelLesson,createLessonFromSchedule,startLessonFromSchedule,getGrowthRecordPage,createGrowthRecord,getTeacherPage,createTeacher,resetPassword,getTemplates1,createTemplate1,getStudentPage,createStudent,getSchedules1,createSchedule1,checkConflict,batchCreateSchedules,createSchedulesByClasses,getParentPage,createParent,bindStudent,unbindStudent,resetPassword1,renewCollection,getGrowthRecordPage1,createGrowthRecord1,getClassPage,createClass,getClassTeachers1,assignTeachers,getClassStudents1,assignStudents,completeTask,markAsRead1,markAllAsRead1,refreshToken,uploadFile,refreshToken1,logout,login,changePassword,findAll,create,getTenantPage,createTenant,resetTenantPassword,findAllLibraries,createLibrary,findAllItems,createItem,batchDeleteItems,getCoursePage1,createCourse,submitCourse,rejectCourse,publishCourse,archiveCourse,findAll1,create1,findSteps,createStep,page,create2,withdraw,submit,republish,reject,publish,archive,getWeeklyStats,getTodayLessons,getTaskCompletions,getCompletionDetail,getDefaultTemplate,getAllStudents,getTodaySchedules,getTimetable,getRecommendedCourses,getMyNotifications,getNotification,getUnreadCount,getStudentRecords,getTodayLessons1,getLessonTrend,getFeedbacks,getFeedbackStats,getDashboard,getCoursePage,getCourse,getAllCourses,getCourseUsage,getClasses,getClassTeachers,getClassStudents,getDefaultTemplate1,getSchoolStats,getActiveTeachers,getLessonTrend1,getCourseUsageStats,getCourseDistribution,getRecentActivities,getTimetable1,getCoursePackageLessonTypes,getCalendarViewData,getTeacherReports,getStudentReports,getOverview,getCourseReports,getTaskList,getTaskDetail,getTaskCompletions1,getStatistics,getCompletionDetail1,getParentChildren,findTenantCollections,getPackagesByCollection,getPackageCourses,getPackageInfo,getPackageUsage,getLogList,getLogDetail,getLogStats,getFeedbacks1,getFeedbackStats1,exportTeacherStats,exportStudentStats,exportLessons,exportGrowthRecords,getSchoolCourses,getSchoolCourse,getMyTasks,getTask1,getTasksByStudent,getCompletionDetail2,getFeedback,getMyNotifications1,getNotification1,getUnreadCount1,getGrowthRecord2,getGrowthRecordsByStudent,getRecentGrowthRecords,getMyChildren,getChild,getChildLessons,getChildGrowth,generateEditToken,generateReadOnlyToken,getOssToken,getCurrentUser,getTenantStats,getAllActiveTenants,getStats,getTrendData,getActiveTenants,getPopularCourses,getRecentActivities1,getTenantDefaults,getStats1,getAllPublishedCourses,findByType,getAllPublishedCollections,deleteFile}}; export type GetTaskResult = NonNullable['getTask']>>> export type UpdateTaskResult = NonNullable['updateTask']>>> export type DeleteTaskResult = NonNullable['deleteTask']>>> +export type UpdateFeedbackResult = NonNullable['updateFeedback']>>> +export type SubmitFeedbackResult = NonNullable['submitFeedback']>>> export type GetTemplateResult = NonNullable['getTemplate']>>> export type UpdateTemplateResult = NonNullable['updateTemplate']>>> export type DeleteTemplateResult = NonNullable['deleteTemplate']>>> @@ -3820,9 +3919,6 @@ export type DeleteGrowthRecordResult = NonNullable['getTeacher']>>> export type UpdateTeacherResult = NonNullable['updateTeacher']>>> export type DeleteTeacherResult = NonNullable['deleteTeacher']>>> -export type GetTask1Result = NonNullable['getTask1']>>> -export type UpdateTask1Result = NonNullable['updateTask1']>>> -export type DeleteTask1Result = NonNullable['deleteTask1']>>> export type GetTemplate1Result = NonNullable['getTemplate1']>>> export type UpdateTemplate1Result = NonNullable['updateTemplate1']>>> export type DeleteTemplate1Result = NonNullable['deleteTemplate1']>>> @@ -3851,9 +3947,8 @@ export type UpdateClassResult = NonNullable['deleteClass']>>> export type UpdateClassTeacherResult = NonNullable['updateClassTeacher']>>> export type RemoveClassTeacherResult = NonNullable['removeClassTeacher']>>> -export type GetGrowthRecord2Result = NonNullable['getGrowthRecord2']>>> -export type UpdateGrowthRecord2Result = NonNullable['updateGrowthRecord2']>>> -export type DeleteGrowthRecord2Result = NonNullable['deleteGrowthRecord2']>>> +export type UpdateSubmissionResult = NonNullable['updateSubmission']>>> +export type SubmitTaskResult = NonNullable['submitTask']>>> export type FindOneResult = NonNullable['findOne']>>> export type UpdateResult = NonNullable['update']>>> export type _DeleteResult = NonNullable['_delete']>>> @@ -3908,7 +4003,7 @@ export type SaveStudentRecordResult = NonNullable['batchSaveStudentRecords']>>> export type StartLessonResult = NonNullable['startLesson']>>> export type GetLessonFeedbackResult = NonNullable['getLessonFeedback']>>> -export type SubmitFeedbackResult = NonNullable['submitFeedback']>>> +export type SubmitFeedback1Result = NonNullable['submitFeedback1']>>> export type CompleteLessonResult = NonNullable['completeLesson']>>> export type CancelLessonResult = NonNullable['cancelLesson']>>> export type CreateLessonFromScheduleResult = NonNullable['createLessonFromSchedule']>>> @@ -3918,8 +4013,6 @@ export type CreateGrowthRecordResult = NonNullable['getTeacherPage']>>> export type CreateTeacherResult = NonNullable['createTeacher']>>> export type ResetPasswordResult = NonNullable['resetPassword']>>> -export type GetTaskPage1Result = NonNullable['getTaskPage1']>>> -export type CreateTask1Result = NonNullable['createTask1']>>> export type GetTemplates1Result = NonNullable['getTemplates1']>>> export type CreateTemplate1Result = NonNullable['createTemplate1']>>> export type GetStudentPageResult = NonNullable['getStudentPage']>>> @@ -3946,7 +4039,6 @@ export type AssignStudentsResult = NonNullable['completeTask']>>> export type MarkAsRead1Result = NonNullable['markAsRead1']>>> export type MarkAllAsRead1Result = NonNullable['markAllAsRead1']>>> -export type CreateGrowthRecord2Result = NonNullable['createGrowthRecord2']>>> export type RefreshTokenResult = NonNullable['refreshToken']>>> export type UploadFileResult = NonNullable['uploadFile']>>> export type RefreshToken1Result = NonNullable['refreshToken1']>>> @@ -3983,6 +4075,8 @@ export type PublishResult = NonNullable['archive']>>> export type GetWeeklyStatsResult = NonNullable['getWeeklyStats']>>> export type GetTodayLessonsResult = NonNullable['getTodayLessons']>>> +export type GetTaskCompletionsResult = NonNullable['getTaskCompletions']>>> +export type GetCompletionDetailResult = NonNullable['getCompletionDetail']>>> export type GetDefaultTemplateResult = NonNullable['getDefaultTemplate']>>> export type GetAllStudentsResult = NonNullable['getAllStudents']>>> export type GetTodaySchedulesResult = NonNullable['getTodaySchedules']>>> @@ -4018,6 +4112,11 @@ export type GetTeacherReportsResult = NonNullable['getStudentReports']>>> export type GetOverviewResult = NonNullable['getOverview']>>> export type GetCourseReportsResult = NonNullable['getCourseReports']>>> +export type GetTaskListResult = NonNullable['getTaskList']>>> +export type GetTaskDetailResult = NonNullable['getTaskDetail']>>> +export type GetTaskCompletions1Result = NonNullable['getTaskCompletions1']>>> +export type GetStatisticsResult = NonNullable['getStatistics']>>> +export type GetCompletionDetail1Result = NonNullable['getCompletionDetail1']>>> export type GetParentChildrenResult = NonNullable['getParentChildren']>>> export type FindTenantCollectionsResult = NonNullable['findTenantCollections']>>> export type GetPackagesByCollectionResult = NonNullable['getPackagesByCollection']>>> @@ -4036,15 +4135,19 @@ export type ExportGrowthRecordsResult = NonNullable['getSchoolCourses']>>> export type GetSchoolCourseResult = NonNullable['getSchoolCourse']>>> export type GetMyTasksResult = NonNullable['getMyTasks']>>> -export type GetTask2Result = NonNullable['getTask2']>>> +export type GetTask1Result = NonNullable['getTask1']>>> export type GetTasksByStudentResult = NonNullable['getTasksByStudent']>>> +export type GetCompletionDetail2Result = NonNullable['getCompletionDetail2']>>> +export type GetFeedbackResult = NonNullable['getFeedback']>>> export type GetMyNotifications1Result = NonNullable['getMyNotifications1']>>> export type GetNotification1Result = NonNullable['getNotification1']>>> export type GetUnreadCount1Result = NonNullable['getUnreadCount1']>>> +export type GetGrowthRecord2Result = NonNullable['getGrowthRecord2']>>> export type GetGrowthRecordsByStudentResult = NonNullable['getGrowthRecordsByStudent']>>> export type GetRecentGrowthRecordsResult = NonNullable['getRecentGrowthRecords']>>> export type GetMyChildrenResult = NonNullable['getMyChildren']>>> export type GetChildResult = NonNullable['getChild']>>> +export type GetChildLessonsResult = NonNullable['getChildLessons']>>> export type GetChildGrowthResult = NonNullable['getChildGrowth']>>> export type GenerateEditTokenResult = NonNullable['generateEditToken']>>> export type GenerateReadOnlyTokenResult = NonNullable['generateReadOnlyToken']>>> diff --git a/reading-platform-frontend/src/api/generated/model/batchStudentRecordsRequest.ts b/reading-platform-frontend/src/api/generated/model/batchStudentRecordsRequest.ts new file mode 100644 index 0000000..769332b --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/batchStudentRecordsRequest.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { StudentRecordRequest } from './studentRecordRequest'; + +/** + * 批量保存学生记录请求 + */ +export interface BatchStudentRecordsRequest { + /** 记录列表 */ + records: StudentRecordRequest[]; +} diff --git a/reading-platform-frontend/src/api/generated/model/childInfoResponse.ts b/reading-platform-frontend/src/api/generated/model/childInfoResponse.ts new file mode 100644 index 0000000..00f0922 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/childInfoResponse.ts @@ -0,0 +1,29 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { ClassInfo } from './classInfo'; + +/** + * 家长端孩子列表响应 + */ +export interface ChildInfoResponse { + /** 学生ID */ + id?: number; + /** 姓名 */ + name?: string; + /** 性别 */ + gender?: string; + /** 出生日期 */ + birthDate?: string; + /** 与家长关系:FATHER/MOTHER/GRANDFATHER/GRANDMOTHER/OTHER */ + relationship?: string; + /** 阅读次数(student_record 数量) */ + readingCount?: number; + /** 上课次数(lesson 记录数) */ + lessonCount?: number; + class?: ClassInfo; +} diff --git a/reading-platform-frontend/src/api/generated/model/childProfileResponse.ts b/reading-platform-frontend/src/api/generated/model/childProfileResponse.ts new file mode 100644 index 0000000..d14cb19 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/childProfileResponse.ts @@ -0,0 +1,31 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { ClassInfo } from './classInfo'; +import type { StatsInfo } from './statsInfo'; + +/** + * 家长端孩子详情响应 + */ +export interface ChildProfileResponse { + /** 学生ID */ + id?: number; + /** 姓名 */ + name?: string; + /** 性别 */ + gender?: string; + /** 出生日期 */ + birthDate?: string; + /** 与家长关系 */ + relationship?: string; + /** 阅读次数 */ + readingCount?: number; + /** 上课次数 */ + lessonCount?: number; + stats?: StatsInfo; + class?: ClassInfo; +} diff --git a/reading-platform-frontend/src/api/generated/model/classInfo.ts b/reading-platform-frontend/src/api/generated/model/classInfo.ts new file mode 100644 index 0000000..afac5cd --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/classInfo.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 班级信息 + */ +export interface ClassInfo { + /** 班级ID */ + id?: number; + /** 班级名称 */ + name?: string; + /** 年级 */ + grade?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/completeTaskParams.ts b/reading-platform-frontend/src/api/generated/model/completeTaskParams.ts index d7beb15..c2f447d 100644 --- a/reading-platform-frontend/src/api/generated/model/completeTaskParams.ts +++ b/reading-platform-frontend/src/api/generated/model/completeTaskParams.ts @@ -7,7 +7,7 @@ */ export type CompleteTaskParams = { -studentId: number; +studentId?: number; content?: string; attachments?: string; }; diff --git a/reading-platform-frontend/src/api/generated/model/courseCollectionPageQueryRequest.ts b/reading-platform-frontend/src/api/generated/model/courseCollectionPageQueryRequest.ts index a623c65..9b04943 100644 --- a/reading-platform-frontend/src/api/generated/model/courseCollectionPageQueryRequest.ts +++ b/reading-platform-frontend/src/api/generated/model/courseCollectionPageQueryRequest.ts @@ -16,4 +16,6 @@ export interface CourseCollectionPageQueryRequest { pageSize?: number; /** 状态 */ status?: string; + /** 年级(支持多个,逗号分隔) */ + gradeLevels?: string; } diff --git a/reading-platform-frontend/src/api/generated/model/courseInfo.ts b/reading-platform-frontend/src/api/generated/model/courseInfo.ts new file mode 100644 index 0000000..1b89b2d --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/courseInfo.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 关联课程信息 + */ +export interface CourseInfo { + /** 课程ID */ + id?: number; + /** 课程名称 */ + name?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/coursePageQueryRequest.ts b/reading-platform-frontend/src/api/generated/model/coursePageQueryRequest.ts index c7ce177..64e0035 100644 --- a/reading-platform-frontend/src/api/generated/model/coursePageQueryRequest.ts +++ b/reading-platform-frontend/src/api/generated/model/coursePageQueryRequest.ts @@ -20,6 +20,8 @@ export interface CoursePageQueryRequest { category?: string; /** 状态 */ status?: string; + /** 年级(支持多个,逗号分隔) */ + gradeTags?: string; /** 是否仅查询待审核 */ reviewOnly?: boolean; } diff --git a/reading-platform-frontend/src/api/generated/model/courseResponse.ts b/reading-platform-frontend/src/api/generated/model/courseResponse.ts index 592a81d..fe341b3 100644 --- a/reading-platform-frontend/src/api/generated/model/courseResponse.ts +++ b/reading-platform-frontend/src/api/generated/model/courseResponse.ts @@ -6,6 +6,7 @@ * OpenAPI spec version: 1.0.0 */ import type { CourseLessonResponse } from './courseLessonResponse'; +import type { LessonTagResponse } from './lessonTagResponse'; /** * 课程响应 @@ -89,10 +90,10 @@ export interface CourseResponse { activitiesData?: string; /** 评估数据 */ assessmentData?: string; - /** 年级标签 */ - gradeTags?: string; - /** 领域标签 */ - domainTags?: string; + /** 年级标签(规范为数组,与套餐管理适用年级对齐) */ + gradeTags?: string[]; + /** 领域标签(规范为数组) */ + domainTags?: string[]; /** 是否有集体课 */ hasCollectiveLesson?: number; /** 版本号 */ @@ -129,4 +130,6 @@ export interface CourseResponse { updatedAt?: string; /** 关联的课程环节 */ courseLessons?: CourseLessonResponse[]; + /** 课程环节标签(列表展示用,仅 name 和 lessonType) */ + lessonTags?: LessonTagResponse[]; } diff --git a/reading-platform-frontend/src/api/generated/model/dayScheduleItem.ts b/reading-platform-frontend/src/api/generated/model/dayScheduleItem.ts index aa05d34..8d1457e 100644 --- a/reading-platform-frontend/src/api/generated/model/dayScheduleItem.ts +++ b/reading-platform-frontend/src/api/generated/model/dayScheduleItem.ts @@ -16,6 +16,8 @@ export interface DayScheduleItem { className?: string; /** 课程包名称 */ coursePackageName?: string; + /** 课程类型代码 (如 DOMAIN_HEALTH) */ + lessonType?: string; /** 课程类型名称 */ lessonTypeName?: string; /** 教师名称 */ diff --git a/reading-platform-frontend/src/api/generated/model/getAllCoursesParams.ts b/reading-platform-frontend/src/api/generated/model/getAllCoursesParams.ts new file mode 100644 index 0000000..1c207b3 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/getAllCoursesParams.ts @@ -0,0 +1,13 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +export type GetAllCoursesParams = { +keyword?: string; +grade?: string; +domain?: string; +}; diff --git a/reading-platform-frontend/src/api/generated/model/getChildLessonsParams.ts b/reading-platform-frontend/src/api/generated/model/getChildLessonsParams.ts new file mode 100644 index 0000000..423f26d --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/getChildLessonsParams.ts @@ -0,0 +1,12 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +export type GetChildLessonsParams = { +pageNum?: number; +pageSize?: number; +}; diff --git a/reading-platform-frontend/src/api/generated/model/getCoursePageParams.ts b/reading-platform-frontend/src/api/generated/model/getCoursePageParams.ts index a9a1091..d76fffd 100644 --- a/reading-platform-frontend/src/api/generated/model/getCoursePageParams.ts +++ b/reading-platform-frontend/src/api/generated/model/getCoursePageParams.ts @@ -10,5 +10,7 @@ export type GetCoursePageParams = { pageNum?: number; pageSize?: number; keyword?: string; -category?: string; +grade?: string; +domain?: string; +lessonType?: string; }; diff --git a/reading-platform-frontend/src/api/generated/model/getMyNotifications1Params.ts b/reading-platform-frontend/src/api/generated/model/getMyNotifications1Params.ts index fd065a5..be3e3b2 100644 --- a/reading-platform-frontend/src/api/generated/model/getMyNotifications1Params.ts +++ b/reading-platform-frontend/src/api/generated/model/getMyNotifications1Params.ts @@ -10,4 +10,5 @@ export type GetMyNotifications1Params = { pageNum?: number; pageSize?: number; isRead?: number; +notificationType?: string; }; diff --git a/reading-platform-frontend/src/api/generated/model/getStatisticsParams.ts b/reading-platform-frontend/src/api/generated/model/getStatisticsParams.ts new file mode 100644 index 0000000..c331950 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/getStatisticsParams.ts @@ -0,0 +1,13 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +export type GetStatisticsParams = { +dateType?: string; +startDate?: string; +endDate?: string; +}; diff --git a/reading-platform-frontend/src/api/generated/model/getTaskCompletions1Params.ts b/reading-platform-frontend/src/api/generated/model/getTaskCompletions1Params.ts new file mode 100644 index 0000000..ddaafca --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/getTaskCompletions1Params.ts @@ -0,0 +1,13 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +export type GetTaskCompletions1Params = { +pageNum?: number; +pageSize?: number; +status?: string; +}; diff --git a/reading-platform-frontend/src/api/generated/model/getTaskCompletionsParams.ts b/reading-platform-frontend/src/api/generated/model/getTaskCompletionsParams.ts new file mode 100644 index 0000000..15bf455 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/getTaskCompletionsParams.ts @@ -0,0 +1,13 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +export type GetTaskCompletionsParams = { +pageNum?: number; +pageSize?: number; +status?: string; +}; diff --git a/reading-platform-frontend/src/api/generated/model/getTaskListParams.ts b/reading-platform-frontend/src/api/generated/model/getTaskListParams.ts new file mode 100644 index 0000000..d5f7f3b --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/getTaskListParams.ts @@ -0,0 +1,23 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +export type GetTaskListParams = { +pageNum?: number; +pageSize?: number; +keyword?: string; +type?: string; +status?: string; +classIds?: number[]; +teacherIds?: number[]; +dateType?: string; +startDate?: string; +endDate?: string; +completionRate?: string; +sortBy?: string; +sortOrder?: string; +}; diff --git a/reading-platform-frontend/src/api/generated/model/getTaskPageParams.ts b/reading-platform-frontend/src/api/generated/model/getTaskPageParams.ts index 4f0c74c..bdafab8 100644 --- a/reading-platform-frontend/src/api/generated/model/getTaskPageParams.ts +++ b/reading-platform-frontend/src/api/generated/model/getTaskPageParams.ts @@ -11,5 +11,6 @@ pageNum?: number; pageSize?: number; keyword?: string; type?: string; +taskType?: string; status?: string; }; diff --git a/reading-platform-frontend/src/api/generated/model/getTemplates1Params.ts b/reading-platform-frontend/src/api/generated/model/getTemplates1Params.ts index 806979e..245e7d4 100644 --- a/reading-platform-frontend/src/api/generated/model/getTemplates1Params.ts +++ b/reading-platform-frontend/src/api/generated/model/getTemplates1Params.ts @@ -10,4 +10,6 @@ export type GetTemplates1Params = { pageNum?: number; pageSize?: number; type?: string; +taskType?: string; +keyword?: string; }; diff --git a/reading-platform-frontend/src/api/generated/model/getTemplatesParams.ts b/reading-platform-frontend/src/api/generated/model/getTemplatesParams.ts index 8783732..04f7819 100644 --- a/reading-platform-frontend/src/api/generated/model/getTemplatesParams.ts +++ b/reading-platform-frontend/src/api/generated/model/getTemplatesParams.ts @@ -10,4 +10,5 @@ export type GetTemplatesParams = { pageNum?: number; pageSize?: number; type?: string; +keyword?: string; }; diff --git a/reading-platform-frontend/src/api/generated/model/growthRecordForParentResponse.ts b/reading-platform-frontend/src/api/generated/model/growthRecordForParentResponse.ts new file mode 100644 index 0000000..80454a4 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/growthRecordForParentResponse.ts @@ -0,0 +1,29 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { ClassInfo } from './classInfo'; + +/** + * 家长端成长档案响应 + */ +export interface GrowthRecordForParentResponse { + /** ID */ + id?: number; + /** 标题 */ + title?: string; + /** 内容 */ + content?: string; + /** 图片URL列表 */ + images?: string[]; + /** 记录日期 */ + recordDate?: string; + /** 记录类型 */ + recordType?: string; + /** 创建时间 */ + createdAt?: string; + class?: ClassInfo; +} diff --git a/reading-platform-frontend/src/api/generated/model/index.ts b/reading-platform-frontend/src/api/generated/model/index.ts index 1d46e5a..764f5b4 100644 --- a/reading-platform-frontend/src/api/generated/model/index.ts +++ b/reading-platform-frontend/src/api/generated/model/index.ts @@ -20,12 +20,16 @@ export * from './basicSettingsUpdateRequest'; export * from './batchCreateSchedulesBody'; export * from './batchStudentRecordsDto'; export * from './batchStudentRecordsDtoRecordsItem'; +export * from './batchStudentRecordsRequest'; export * from './bindStudentParams'; export * from './calendarViewResponse'; export * from './calendarViewResponseSchedules'; export * from './changePasswordParams'; export * from './checkConflictParams'; +export * from './childInfoResponse'; +export * from './childProfileResponse'; export * from './classCreateRequest'; +export * from './classInfo'; export * from './classResponse'; export * from './classTeacherResponse'; export * from './classUpdateRequest'; @@ -40,6 +44,7 @@ export * from './courseCollectionResponse'; export * from './courseControllerFindAllParams'; export * from './courseControllerGetReviewListParams'; export * from './courseCreateRequest'; +export * from './courseInfo'; export * from './courseLesson'; export * from './courseLessonCreateRequest'; export * from './courseLessonResponse'; @@ -95,8 +100,10 @@ export * from './getActiveTeachersParams'; export * from './getActiveTenants200'; export * from './getActiveTenants200DataItem'; export * from './getActiveTenantsParams'; +export * from './getAllCoursesParams'; export * from './getAllStudentsParams'; export * from './getCalendarViewDataParams'; +export * from './getChildLessonsParams'; export * from './getClassPageParams'; export * from './getClassStudents1Params'; export * from './getClassStudentsParams'; @@ -127,7 +134,11 @@ export * from './getRecentGrowthRecordsParams'; export * from './getSchedules1Params'; export * from './getSchedulesParams'; export * from './getSchoolCoursesParams'; +export * from './getStatisticsParams'; export * from './getStudentPageParams'; +export * from './getTaskCompletions1Params'; +export * from './getTaskCompletionsParams'; +export * from './getTaskListParams'; export * from './getTaskPage1Params'; export * from './getTaskPageParams'; export * from './getTasksByStudentParams'; @@ -141,6 +152,7 @@ export * from './grantCollectionRequest'; export * from './grantRequest'; export * from './growthRecord'; export * from './growthRecordCreateRequest'; +export * from './growthRecordForParentResponse'; export * from './growthRecordResponse'; export * from './growthRecordUpdateRequest'; export * from './immTokenVo'; @@ -156,14 +168,17 @@ export * from './lessonFeedbackDtoActivitiesDone'; export * from './lessonFeedbackDtoStepFeedbacks'; export * from './lessonFeedbackRequest'; export * from './lessonFeedbackResponse'; +export * from './lessonInfo'; export * from './lessonProgressDto'; export * from './lessonProgressDtoProgressData'; export * from './lessonProgressRequest'; export * from './lessonProgressRequestProgressData'; +export * from './lessonRecordResponse'; export * from './lessonResponse'; export * from './lessonStep'; export * from './lessonStepCreateRequest'; export * from './lessonStepResponse'; +export * from './lessonTagResponse'; export * from './lessonTypeInfo'; export * from './lessonUpdateRequest'; export * from './libraryCreateRequest'; @@ -174,6 +189,7 @@ export * from './loginDto'; export * from './loginRequest'; export * from './loginResponse'; export * from './notification'; +export * from './notificationForParentResponse'; export * from './notificationResponse'; export * from './notificationSettingsResponse'; export * from './notificationSettingsUpdateRequest'; @@ -197,11 +213,14 @@ export * from './pageResultCourseCollectionResponse'; export * from './pageResultCoursePackageResponse'; export * from './pageResultCourseResponse'; export * from './pageResultGrowthRecord'; +export * from './pageResultGrowthRecordForParentResponse'; export * from './pageResultGrowthRecordResponse'; export * from './pageResultLesson'; export * from './pageResultLessonFeedbackResponse'; +export * from './pageResultLessonRecordResponse'; export * from './pageResultLessonResponse'; export * from './pageResultNotification'; +export * from './pageResultNotificationForParentResponse'; export * from './pageResultNotificationResponse'; export * from './pageResultOperationLogResponse'; export * from './pageResultParent'; @@ -211,11 +230,14 @@ export * from './pageResultResourceItemResponse'; export * from './pageResultResourceLibrary'; export * from './pageResultResourceLibraryResponse'; export * from './pageResultSchedulePlanResponse'; +export * from './pageResultSchoolCourseResponse'; export * from './pageResultStudent'; export * from './pageResultStudentResponse'; export * from './pageResultTask'; +export * from './pageResultTaskCompletionDetailResponse'; export * from './pageResultTaskResponse'; export * from './pageResultTaskTemplateResponse'; +export * from './pageResultTaskWithCompletionResponse'; export * from './pageResultTeacher'; export * from './pageResultTeacherResponse'; export * from './pageResultTenant'; @@ -247,6 +269,7 @@ export * from './resourceLibraryResponse'; export * from './resourceLibraryUpdateRequest'; export * from './resultBasicSettingsResponse'; export * from './resultCalendarViewResponse'; +export * from './resultChildProfileResponse'; export * from './resultClassResponse'; export * from './resultClazz'; export * from './resultConflictCheckResult'; @@ -260,6 +283,7 @@ export * from './resultCourseResponse'; export * from './resultDto'; export * from './resultDtoData'; export * from './resultGrowthRecord'; +export * from './resultGrowthRecordForParentResponse'; export * from './resultGrowthRecordResponse'; export * from './resultImmTokenVo'; export * from './resultLesson'; @@ -269,6 +293,7 @@ export * from './resultLessonResponse'; export * from './resultLessonStep'; export * from './resultLessonStepResponse'; export * from './resultListActiveTenantItemResponse'; +export * from './resultListChildInfoResponse'; export * from './resultListClassResponse'; export * from './resultListClassTeacherResponse'; export * from './resultListClazz'; @@ -281,6 +306,7 @@ export * from './resultListCoursePackageResponse'; export * from './resultListCourseReportResponse'; export * from './resultListCourseResponse'; export * from './resultListGrowthRecord'; +export * from './resultListGrowthRecordForParentResponse'; export * from './resultListGrowthRecordResponse'; export * from './resultListLesson'; export * from './resultListLessonResponse'; @@ -308,7 +334,10 @@ export * from './resultLoginResponse'; export * from './resultLong'; export * from './resultMapStringObject'; export * from './resultMapStringObjectData'; +export * from './resultMapStringString'; +export * from './resultMapStringStringData'; export * from './resultNotification'; +export * from './resultNotificationForParentResponse'; export * from './resultNotificationResponse'; export * from './resultNotificationSettingsResponse'; export * from './resultObject'; @@ -327,11 +356,14 @@ export * from './resultPageResultCourseCollectionResponse'; export * from './resultPageResultCoursePackageResponse'; export * from './resultPageResultCourseResponse'; export * from './resultPageResultGrowthRecord'; +export * from './resultPageResultGrowthRecordForParentResponse'; export * from './resultPageResultGrowthRecordResponse'; export * from './resultPageResultLesson'; export * from './resultPageResultLessonFeedbackResponse'; +export * from './resultPageResultLessonRecordResponse'; export * from './resultPageResultLessonResponse'; export * from './resultPageResultNotification'; +export * from './resultPageResultNotificationForParentResponse'; export * from './resultPageResultNotificationResponse'; export * from './resultPageResultOperationLogResponse'; export * from './resultPageResultParent'; @@ -341,11 +373,14 @@ export * from './resultPageResultResourceItemResponse'; export * from './resultPageResultResourceLibrary'; export * from './resultPageResultResourceLibraryResponse'; export * from './resultPageResultSchedulePlanResponse'; +export * from './resultPageResultSchoolCourseResponse'; export * from './resultPageResultStudent'; export * from './resultPageResultStudentResponse'; export * from './resultPageResultTask'; +export * from './resultPageResultTaskCompletionDetailResponse'; export * from './resultPageResultTaskResponse'; export * from './resultPageResultTaskTemplateResponse'; +export * from './resultPageResultTaskWithCompletionResponse'; export * from './resultPageResultTeacher'; export * from './resultPageResultTeacherResponse'; export * from './resultPageResultTenant'; @@ -358,6 +393,7 @@ export * from './resultResourceItemResponse'; export * from './resultResourceLibrary'; export * from './resultResourceLibraryResponse'; export * from './resultSchedulePlanResponse'; +export * from './resultSchoolCourseResponse'; export * from './resultSchoolSettingsResponse'; export * from './resultSecuritySettingsResponse'; export * from './resultStatsResponse'; @@ -365,8 +401,11 @@ export * from './resultStatsTrendResponse'; export * from './resultString'; export * from './resultStudent'; export * from './resultStudentRecordResponse'; +export * from './resultStudentRecordsResponse'; export * from './resultStudentResponse'; export * from './resultTask'; +export * from './resultTaskCompletionDetailResponse'; +export * from './resultTaskFeedbackResponse'; export * from './resultTaskResponse'; export * from './resultTaskTemplateResponse'; export * from './resultTeacher'; @@ -387,6 +426,7 @@ export * from './schedulePlanCreateRequest'; export * from './schedulePlanResponse'; export * from './schedulePlanUpdateRequest'; export * from './schoolControllerImportStudentsParams'; +export * from './schoolCourseResponse'; export * from './schoolFeedbackControllerFindAllParams'; export * from './schoolSettingsResponse'; export * from './schoolSettingsUpdateRequest'; @@ -396,24 +436,35 @@ export * from './securitySettingsUpdateRequest'; export * from './statsControllerGetActiveTeachersParams'; export * from './statsControllerGetLessonTrendParams'; export * from './statsControllerGetRecentActivitiesParams'; +export * from './statsInfo'; export * from './statsResponse'; export * from './statsTrendResponse'; export * from './stepCreateRequest'; export * from './student'; export * from './studentCreateRequest'; +export * from './studentInfo'; export * from './studentRecordDto'; export * from './studentRecordRequest'; export * from './studentRecordResponse'; +export * from './studentRecordsResponse'; export * from './studentReportResponse'; export * from './studentResponse'; export * from './studentUpdateRequest'; +export * from './studentWithRecordResponse'; export * from './submitCourseDto'; export * from './task'; +export * from './taskCompleteRequest'; +export * from './taskCompletionDetailResponse'; export * from './taskCreateRequest'; +export * from './taskFeedbackRequest'; +export * from './taskFeedbackResponse'; +export * from './taskInfo'; export * from './taskResponse'; +export * from './taskSubmitRequest'; export * from './taskTemplateCreateRequest'; export * from './taskTemplateResponse'; export * from './taskUpdateRequest'; +export * from './taskWithCompletionResponse'; export * from './teacher'; export * from './teacherCourseControllerFindAllParams'; export * from './teacherCourseControllerGetAllStudentsParams'; @@ -425,6 +476,7 @@ export * from './teacherCreateRequest'; export * from './teacherFeedbackControllerFindAllParams'; export * from './teacherReportResponse'; export * from './teacherResponse'; +export * from './teacherResponseClassNames'; export * from './teacherTaskControllerGetMonthlyStatsParams'; export * from './teacherUpdateRequest'; export * from './tenant'; diff --git a/reading-platform-frontend/src/api/generated/model/lessonDetailResponse.ts b/reading-platform-frontend/src/api/generated/model/lessonDetailResponse.ts index 881bb8b..a7c1487 100644 --- a/reading-platform-frontend/src/api/generated/model/lessonDetailResponse.ts +++ b/reading-platform-frontend/src/api/generated/model/lessonDetailResponse.ts @@ -15,7 +15,7 @@ import type { LessonResponse } from './lessonResponse'; export interface LessonDetailResponse { lesson?: LessonResponse; course?: CourseResponse; - class?: ClassResponse; /** 排课选择的课程类型(子课程模式时用于直接进入对应子课程) */ lessonType?: string; + class?: ClassResponse; } diff --git a/reading-platform-frontend/src/api/generated/model/lessonInfo.ts b/reading-platform-frontend/src/api/generated/model/lessonInfo.ts new file mode 100644 index 0000000..85bc603 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/lessonInfo.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 课时简要信息 + */ +export interface LessonInfo { + /** 课时 ID */ + id?: number; + /** 状态 */ + status?: string; + /** 班级名称 */ + className?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/lessonRecordResponse.ts b/reading-platform-frontend/src/api/generated/model/lessonRecordResponse.ts new file mode 100644 index 0000000..3b9647e --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/lessonRecordResponse.ts @@ -0,0 +1,29 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { LessonInfo } from './lessonInfo'; + +/** + * 家长端阅读记录响应 + */ +export interface LessonRecordResponse { + /** 记录ID(student_record.id) */ + id?: number; + lesson?: LessonInfo; + /** 专注度评分 */ + focus?: number; + /** 参与度评分 */ + participation?: number; + /** 兴趣度评分 */ + interest?: number; + /** 理解度评分 */ + understanding?: number; + /** 备注 */ + notes?: string; + /** 创建时间 */ + createdAt?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/lessonTagResponse.ts b/reading-platform-frontend/src/api/generated/model/lessonTagResponse.ts new file mode 100644 index 0000000..84f0bab --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/lessonTagResponse.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 课程环节标签 + */ +export interface LessonTagResponse { + /** 环节名称 */ + name?: string; + /** 环节类型:INTRODUCTION、COLLECTIVE、LANGUAGE、HEALTH、SCIENCE、SOCIAL、ART */ + lessonType?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/notificationForParentResponse.ts b/reading-platform-frontend/src/api/generated/model/notificationForParentResponse.ts new file mode 100644 index 0000000..417fd7d --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/notificationForParentResponse.ts @@ -0,0 +1,27 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 家长端通知响应 + */ +export interface NotificationForParentResponse { + /** ID */ + id?: number; + /** 标题 */ + title?: string; + /** 内容 */ + content?: string; + /** 是否已读 */ + isRead?: boolean; + /** 阅读时间 */ + readAt?: string; + /** 创建时间 */ + createdAt?: string; + /** 通知类型 */ + notificationType?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/pageResultGrowthRecordForParentResponse.ts b/reading-platform-frontend/src/api/generated/model/pageResultGrowthRecordForParentResponse.ts new file mode 100644 index 0000000..490b6e7 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/pageResultGrowthRecordForParentResponse.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { GrowthRecordForParentResponse } from './growthRecordForParentResponse'; + +export interface PageResultGrowthRecordForParentResponse { + list?: GrowthRecordForParentResponse[]; + total?: number; + pageNum?: number; + pageSize?: number; + pages?: number; +} diff --git a/reading-platform-frontend/src/api/generated/model/pageResultLessonRecordResponse.ts b/reading-platform-frontend/src/api/generated/model/pageResultLessonRecordResponse.ts new file mode 100644 index 0000000..5eb4d59 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/pageResultLessonRecordResponse.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { LessonRecordResponse } from './lessonRecordResponse'; + +export interface PageResultLessonRecordResponse { + list?: LessonRecordResponse[]; + total?: number; + pageNum?: number; + pageSize?: number; + pages?: number; +} diff --git a/reading-platform-frontend/src/api/generated/model/pageResultNotificationForParentResponse.ts b/reading-platform-frontend/src/api/generated/model/pageResultNotificationForParentResponse.ts new file mode 100644 index 0000000..9785d7a --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/pageResultNotificationForParentResponse.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { NotificationForParentResponse } from './notificationForParentResponse'; + +export interface PageResultNotificationForParentResponse { + list?: NotificationForParentResponse[]; + total?: number; + pageNum?: number; + pageSize?: number; + pages?: number; +} diff --git a/reading-platform-frontend/src/api/generated/model/pageResultSchoolCourseResponse.ts b/reading-platform-frontend/src/api/generated/model/pageResultSchoolCourseResponse.ts new file mode 100644 index 0000000..4701863 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/pageResultSchoolCourseResponse.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { SchoolCourseResponse } from './schoolCourseResponse'; + +export interface PageResultSchoolCourseResponse { + list?: SchoolCourseResponse[]; + total?: number; + pageNum?: number; + pageSize?: number; + pages?: number; +} diff --git a/reading-platform-frontend/src/api/generated/model/pageResultTaskCompletionDetailResponse.ts b/reading-platform-frontend/src/api/generated/model/pageResultTaskCompletionDetailResponse.ts new file mode 100644 index 0000000..1eccb47 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/pageResultTaskCompletionDetailResponse.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { TaskCompletionDetailResponse } from './taskCompletionDetailResponse'; + +export interface PageResultTaskCompletionDetailResponse { + list?: TaskCompletionDetailResponse[]; + total?: number; + pageNum?: number; + pageSize?: number; + pages?: number; +} diff --git a/reading-platform-frontend/src/api/generated/model/pageResultTaskWithCompletionResponse.ts b/reading-platform-frontend/src/api/generated/model/pageResultTaskWithCompletionResponse.ts new file mode 100644 index 0000000..7f8bccc --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/pageResultTaskWithCompletionResponse.ts @@ -0,0 +1,16 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { TaskWithCompletionResponse } from './taskWithCompletionResponse'; + +export interface PageResultTaskWithCompletionResponse { + list?: TaskWithCompletionResponse[]; + total?: number; + pageNum?: number; + pageSize?: number; + pages?: number; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultChildProfileResponse.ts b/reading-platform-frontend/src/api/generated/model/resultChildProfileResponse.ts new file mode 100644 index 0000000..1502fa4 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultChildProfileResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { ChildProfileResponse } from './childProfileResponse'; + +export interface ResultChildProfileResponse { + code?: number; + message?: string; + data?: ChildProfileResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultGrowthRecordForParentResponse.ts b/reading-platform-frontend/src/api/generated/model/resultGrowthRecordForParentResponse.ts new file mode 100644 index 0000000..f7d8c37 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultGrowthRecordForParentResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { GrowthRecordForParentResponse } from './growthRecordForParentResponse'; + +export interface ResultGrowthRecordForParentResponse { + code?: number; + message?: string; + data?: GrowthRecordForParentResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultListChildInfoResponse.ts b/reading-platform-frontend/src/api/generated/model/resultListChildInfoResponse.ts new file mode 100644 index 0000000..7fe8987 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultListChildInfoResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { ChildInfoResponse } from './childInfoResponse'; + +export interface ResultListChildInfoResponse { + code?: number; + message?: string; + data?: ChildInfoResponse[]; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultListGrowthRecordForParentResponse.ts b/reading-platform-frontend/src/api/generated/model/resultListGrowthRecordForParentResponse.ts new file mode 100644 index 0000000..8529161 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultListGrowthRecordForParentResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { GrowthRecordForParentResponse } from './growthRecordForParentResponse'; + +export interface ResultListGrowthRecordForParentResponse { + code?: number; + message?: string; + data?: GrowthRecordForParentResponse[]; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultMapStringString.ts b/reading-platform-frontend/src/api/generated/model/resultMapStringString.ts new file mode 100644 index 0000000..2da2ec1 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultMapStringString.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { ResultMapStringStringData } from './resultMapStringStringData'; + +export interface ResultMapStringString { + code?: number; + message?: string; + data?: ResultMapStringStringData; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultMapStringStringData.ts b/reading-platform-frontend/src/api/generated/model/resultMapStringStringData.ts new file mode 100644 index 0000000..8feaaf1 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultMapStringStringData.ts @@ -0,0 +1,9 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +export type ResultMapStringStringData = {[key: string]: string}; diff --git a/reading-platform-frontend/src/api/generated/model/resultNotificationForParentResponse.ts b/reading-platform-frontend/src/api/generated/model/resultNotificationForParentResponse.ts new file mode 100644 index 0000000..26b324b --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultNotificationForParentResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { NotificationForParentResponse } from './notificationForParentResponse'; + +export interface ResultNotificationForParentResponse { + code?: number; + message?: string; + data?: NotificationForParentResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultPageResultGrowthRecordForParentResponse.ts b/reading-platform-frontend/src/api/generated/model/resultPageResultGrowthRecordForParentResponse.ts new file mode 100644 index 0000000..04d50f5 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultPageResultGrowthRecordForParentResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { PageResultGrowthRecordForParentResponse } from './pageResultGrowthRecordForParentResponse'; + +export interface ResultPageResultGrowthRecordForParentResponse { + code?: number; + message?: string; + data?: PageResultGrowthRecordForParentResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultPageResultLessonRecordResponse.ts b/reading-platform-frontend/src/api/generated/model/resultPageResultLessonRecordResponse.ts new file mode 100644 index 0000000..23c421c --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultPageResultLessonRecordResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { PageResultLessonRecordResponse } from './pageResultLessonRecordResponse'; + +export interface ResultPageResultLessonRecordResponse { + code?: number; + message?: string; + data?: PageResultLessonRecordResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultPageResultNotificationForParentResponse.ts b/reading-platform-frontend/src/api/generated/model/resultPageResultNotificationForParentResponse.ts new file mode 100644 index 0000000..cb9a975 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultPageResultNotificationForParentResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { PageResultNotificationForParentResponse } from './pageResultNotificationForParentResponse'; + +export interface ResultPageResultNotificationForParentResponse { + code?: number; + message?: string; + data?: PageResultNotificationForParentResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultPageResultSchoolCourseResponse.ts b/reading-platform-frontend/src/api/generated/model/resultPageResultSchoolCourseResponse.ts new file mode 100644 index 0000000..fdb97f8 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultPageResultSchoolCourseResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { PageResultSchoolCourseResponse } from './pageResultSchoolCourseResponse'; + +export interface ResultPageResultSchoolCourseResponse { + code?: number; + message?: string; + data?: PageResultSchoolCourseResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultPageResultTaskCompletionDetailResponse.ts b/reading-platform-frontend/src/api/generated/model/resultPageResultTaskCompletionDetailResponse.ts new file mode 100644 index 0000000..91c96cd --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultPageResultTaskCompletionDetailResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { PageResultTaskCompletionDetailResponse } from './pageResultTaskCompletionDetailResponse'; + +export interface ResultPageResultTaskCompletionDetailResponse { + code?: number; + message?: string; + data?: PageResultTaskCompletionDetailResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultPageResultTaskWithCompletionResponse.ts b/reading-platform-frontend/src/api/generated/model/resultPageResultTaskWithCompletionResponse.ts new file mode 100644 index 0000000..7ceff43 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultPageResultTaskWithCompletionResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { PageResultTaskWithCompletionResponse } from './pageResultTaskWithCompletionResponse'; + +export interface ResultPageResultTaskWithCompletionResponse { + code?: number; + message?: string; + data?: PageResultTaskWithCompletionResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultSchoolCourseResponse.ts b/reading-platform-frontend/src/api/generated/model/resultSchoolCourseResponse.ts new file mode 100644 index 0000000..9daa42c --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultSchoolCourseResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { SchoolCourseResponse } from './schoolCourseResponse'; + +export interface ResultSchoolCourseResponse { + code?: number; + message?: string; + data?: SchoolCourseResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultStudentRecordsResponse.ts b/reading-platform-frontend/src/api/generated/model/resultStudentRecordsResponse.ts new file mode 100644 index 0000000..0d3b90a --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultStudentRecordsResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { StudentRecordsResponse } from './studentRecordsResponse'; + +export interface ResultStudentRecordsResponse { + code?: number; + message?: string; + data?: StudentRecordsResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultTaskCompletionDetailResponse.ts b/reading-platform-frontend/src/api/generated/model/resultTaskCompletionDetailResponse.ts new file mode 100644 index 0000000..d385b6a --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultTaskCompletionDetailResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { TaskCompletionDetailResponse } from './taskCompletionDetailResponse'; + +export interface ResultTaskCompletionDetailResponse { + code?: number; + message?: string; + data?: TaskCompletionDetailResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/resultTaskFeedbackResponse.ts b/reading-platform-frontend/src/api/generated/model/resultTaskFeedbackResponse.ts new file mode 100644 index 0000000..7953ef5 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/resultTaskFeedbackResponse.ts @@ -0,0 +1,14 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { TaskFeedbackResponse } from './taskFeedbackResponse'; + +export interface ResultTaskFeedbackResponse { + code?: number; + message?: string; + data?: TaskFeedbackResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/schoolCourseResponse.ts b/reading-platform-frontend/src/api/generated/model/schoolCourseResponse.ts new file mode 100644 index 0000000..41c06d5 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/schoolCourseResponse.ts @@ -0,0 +1,50 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { LessonTagResponse } from './lessonTagResponse'; + +/** + * 学校端课程响应 + */ +export interface SchoolCourseResponse { + /** ID */ + id?: number; + /** 租户 ID */ + tenantId?: number; + /** 课程名称 */ + name?: string; + /** 课程编码 */ + code?: string; + /** 描述 */ + description?: string; + /** 绘本名称 */ + pictureBookName?: string; + /** 封面图片路径 */ + coverImagePath?: string; + /** 封面 URL */ + coverUrl?: string; + /** 年级标签(规范为数组) */ + gradeTags?: string[]; + /** 领域标签(规范为数组) */ + domainTags?: string[]; + /** 课程时长(分钟) */ + duration?: number; + /** 使用次数 */ + usageCount?: number; + /** 教师数量 */ + teacherCount?: number; + /** 平均评分 */ + avgRating?: number; + /** 状态 */ + status?: string; + /** 创建时间 */ + createdAt?: string; + /** 更新时间 */ + updatedAt?: string; + /** 课程环节标签(列表展示用,仅 name 和 lessonType) */ + lessonTags?: LessonTagResponse[]; +} diff --git a/reading-platform-frontend/src/api/generated/model/statsInfo.ts b/reading-platform-frontend/src/api/generated/model/statsInfo.ts new file mode 100644 index 0000000..bb27a46 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/statsInfo.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 统计信息 + */ +export interface StatsInfo { + /** 阅读记录数 */ + lessonRecords?: number; + /** 成长档案数 */ + growthRecords?: number; + /** 任务完成数 */ + taskCompletions?: number; +} diff --git a/reading-platform-frontend/src/api/generated/model/studentInfo.ts b/reading-platform-frontend/src/api/generated/model/studentInfo.ts new file mode 100644 index 0000000..ba70eac --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/studentInfo.ts @@ -0,0 +1,23 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { ClassInfo } from './classInfo'; + +/** + * 学生信息 + */ +export interface StudentInfo { + /** 学生ID */ + id?: number; + /** 学生姓名 */ + name?: string; + /** 学生头像 */ + avatar?: string; + /** 性别:MALE/FEMALE */ + gender?: string; + classInfo?: ClassInfo; +} diff --git a/reading-platform-frontend/src/api/generated/model/studentRecordsResponse.ts b/reading-platform-frontend/src/api/generated/model/studentRecordsResponse.ts new file mode 100644 index 0000000..e5735f8 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/studentRecordsResponse.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { LessonInfo } from './lessonInfo'; +import type { StudentWithRecordResponse } from './studentWithRecordResponse'; + +/** + * 课后记录列表响应 + */ +export interface StudentRecordsResponse { + lesson?: LessonInfo; + /** 学生列表(含记录) */ + students?: StudentWithRecordResponse[]; +} diff --git a/reading-platform-frontend/src/api/generated/model/studentWithRecordResponse.ts b/reading-platform-frontend/src/api/generated/model/studentWithRecordResponse.ts new file mode 100644 index 0000000..c59256d --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/studentWithRecordResponse.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { StudentRecordResponse } from './studentRecordResponse'; + +/** + * 学生及其课后记录 + */ +export interface StudentWithRecordResponse { + /** 学生 ID */ + id?: number; + /** 学生姓名 */ + name?: string; + /** 性别 */ + gender?: string; + record?: StudentRecordResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/task.ts b/reading-platform-frontend/src/api/generated/model/task.ts index e2c898f..47a66b4 100644 --- a/reading-platform-frontend/src/api/generated/model/task.ts +++ b/reading-platform-frontend/src/api/generated/model/task.ts @@ -28,6 +28,8 @@ export interface Task { description?: string; /** 任务类型 */ type?: string; + /** 关联绘本名称 */ + relatedBookName?: string; /** 课程 ID */ courseId?: number; /** 创建人 ID */ diff --git a/reading-platform-frontend/src/api/generated/model/taskCompleteRequest.ts b/reading-platform-frontend/src/api/generated/model/taskCompleteRequest.ts new file mode 100644 index 0000000..7e19a55 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/taskCompleteRequest.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 任务完成请求 + */ +export interface TaskCompleteRequest { + /** 学生ID */ + studentId: number; + /** 完成内容/反馈 */ + content?: string; + /** 附件 */ + attachments?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/taskCompletionDetailResponse.ts b/reading-platform-frontend/src/api/generated/model/taskCompletionDetailResponse.ts new file mode 100644 index 0000000..174bc25 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/taskCompletionDetailResponse.ts @@ -0,0 +1,39 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { StudentInfo } from './studentInfo'; +import type { TaskFeedbackResponse } from './taskFeedbackResponse'; + +/** + * 任务完成详情响应 + */ +export interface TaskCompletionDetailResponse { + /** 完成记录ID */ + id?: number; + /** 任务ID */ + taskId?: number; + /** 任务标题 */ + taskTitle?: string; + student?: StudentInfo; + /** 状态:PENDING/SUBMITTED/REVIEWED */ + status?: string; + /** 状态文本:待完成/已提交/已评价 */ + statusText?: string; + /** 照片URL数组 */ + photos?: string[]; + /** 视频URL */ + videoUrl?: string; + /** 语音URL */ + audioUrl?: string; + /** 完成内容/阅读心得 */ + content?: string; + /** 提交时间 */ + submittedAt?: string; + /** 评价时间 */ + reviewedAt?: string; + feedback?: TaskFeedbackResponse; +} diff --git a/reading-platform-frontend/src/api/generated/model/taskCreateRequest.ts b/reading-platform-frontend/src/api/generated/model/taskCreateRequest.ts index 5816fa9..5543d3e 100644 --- a/reading-platform-frontend/src/api/generated/model/taskCreateRequest.ts +++ b/reading-platform-frontend/src/api/generated/model/taskCreateRequest.ts @@ -16,12 +16,20 @@ export interface TaskCreateRequest { description?: string; /** 任务类型:reading-阅读,homework-作业,activity-活动 */ type?: string; + /** 任务类型(前端兼容 taskType) */ + taskType?: string; + /** 关联绘本名称(手动填写) */ + relatedBookName?: string; /** 课程 ID */ courseId?: number; + /** 课程 ID(前端兼容 relatedCourseId) */ + relatedCourseId?: number; /** 开始日期 */ startDate?: string; /** 截止日期 */ dueDate?: string; + /** 截止日期(前端兼容 endDate) */ + endDate?: string; /** 附件(JSON 数组) */ attachments?: string; /** 目标类型:class-班级,student-学生 */ diff --git a/reading-platform-frontend/src/api/generated/model/taskFeedbackRequest.ts b/reading-platform-frontend/src/api/generated/model/taskFeedbackRequest.ts new file mode 100644 index 0000000..13a7f7c --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/taskFeedbackRequest.ts @@ -0,0 +1,27 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 任务评价请求 + */ +export interface TaskFeedbackRequest { + /** 评价结果:EXCELLENT-优秀/PASSED-通过/NEEDS_WORK-需改进 */ + result: string; + /** + * 评分 1-5(可选) + * @minimum 1 + * @maximum 5 + */ + rating?: number; + /** + * 评语 + * @minLength 0 + * @maxLength 500 + */ + comment?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/taskFeedbackResponse.ts b/reading-platform-frontend/src/api/generated/model/taskFeedbackResponse.ts new file mode 100644 index 0000000..7ab5f79 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/taskFeedbackResponse.ts @@ -0,0 +1,33 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 任务评价响应 + */ +export interface TaskFeedbackResponse { + /** 评价ID */ + id?: number; + /** 完成记录ID */ + completionId?: number; + /** 评价结果:EXCELLENT/PASSED/NEEDS_WORK */ + result?: string; + /** 评价结果文本:优秀/通过/需改进 */ + resultText?: string; + /** 评分 1-5 */ + rating?: number; + /** 评语 */ + comment?: string; + /** 教师ID */ + teacherId?: number; + /** 教师姓名 */ + teacherName?: string; + /** 教师头像 */ + teacherAvatar?: string; + /** 评价时间 */ + createdAt?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/taskInfo.ts b/reading-platform-frontend/src/api/generated/model/taskInfo.ts new file mode 100644 index 0000000..dba5259 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/taskInfo.ts @@ -0,0 +1,29 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { CourseInfo } from './courseInfo'; + +/** + * 任务基本信息 + */ +export interface TaskInfo { + /** 任务ID */ + id?: number; + /** 任务标题 */ + title?: string; + /** 任务描述 */ + description?: string; + /** 任务类型 */ + taskType?: string; + /** 开始日期 */ + startDate?: string; + /** 截止日期 */ + endDate?: string; + /** 关联绘本名称 */ + relatedBookName?: string; + course?: CourseInfo; +} diff --git a/reading-platform-frontend/src/api/generated/model/taskResponse.ts b/reading-platform-frontend/src/api/generated/model/taskResponse.ts index 3439948..2dfe9a0 100644 --- a/reading-platform-frontend/src/api/generated/model/taskResponse.ts +++ b/reading-platform-frontend/src/api/generated/model/taskResponse.ts @@ -20,6 +20,8 @@ export interface TaskResponse { description?: string; /** 任务类型 */ type?: string; + /** 关联绘本名称 */ + relatedBookName?: string; /** 课程 ID */ courseId?: number; /** 创建人 ID */ @@ -34,6 +36,10 @@ export interface TaskResponse { status?: string; /** 附件 */ attachments?: string; + /** 目标类型:CLASS-班级,STUDENT-学生 */ + targetType?: string; + /** 目标 IDs(班级或学生) */ + targetIds?: number[]; /** 创建时间 */ createdAt?: string; /** 更新时间 */ diff --git a/reading-platform-frontend/src/api/generated/model/taskSubmitRequest.ts b/reading-platform-frontend/src/api/generated/model/taskSubmitRequest.ts new file mode 100644 index 0000000..838d3d8 --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/taskSubmitRequest.ts @@ -0,0 +1,31 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 任务提交请求 + */ +export interface TaskSubmitRequest { + /** 学生ID */ + studentId?: number; + /** + * 照片URL数组(最多9张) + * @minItems 0 + * @maxItems 9 + */ + photos?: string[]; + /** 视频URL */ + videoUrl?: string; + /** 语音URL */ + audioUrl?: string; + /** + * 阅读心得/完成内容 + * @minLength 0 + * @maxLength 1000 + */ + content?: string; +} diff --git a/reading-platform-frontend/src/api/generated/model/taskTemplateCreateRequest.ts b/reading-platform-frontend/src/api/generated/model/taskTemplateCreateRequest.ts index 5e64769..4c555bc 100644 --- a/reading-platform-frontend/src/api/generated/model/taskTemplateCreateRequest.ts +++ b/reading-platform-frontend/src/api/generated/model/taskTemplateCreateRequest.ts @@ -23,9 +23,9 @@ export interface TaskTemplateCreateRequest { /** 默认持续时间 (天) */ defaultDuration?: number; /** 是否默认模板 */ - isDefault?: number; + isDefault?: boolean; /** 模板内容 */ content?: string; /** 是否公开 */ - isPublic?: number; + isPublic?: boolean; } diff --git a/reading-platform-frontend/src/api/generated/model/taskUpdateRequest.ts b/reading-platform-frontend/src/api/generated/model/taskUpdateRequest.ts index 5150f5a..24413bc 100644 --- a/reading-platform-frontend/src/api/generated/model/taskUpdateRequest.ts +++ b/reading-platform-frontend/src/api/generated/model/taskUpdateRequest.ts @@ -16,6 +16,14 @@ export interface TaskUpdateRequest { description?: string; /** 任务类型 */ type?: string; + /** 任务类型(前端兼容 taskType) */ + taskType?: string; + /** 关联绘本名称 */ + relatedBookName?: string; + /** 课程 ID */ + courseId?: number; + /** 课程 ID(前端兼容 relatedCourseId) */ + relatedCourseId?: number; /** 开始日期 */ startDate?: string; /** 截止日期 */ @@ -24,4 +32,8 @@ export interface TaskUpdateRequest { status?: string; /** 附件(JSON 数组) */ attachments?: string; + /** 目标类型:CLASS-班级,STUDENT-学生 */ + targetType?: string; + /** 目标 IDs */ + targetIds?: number[]; } diff --git a/reading-platform-frontend/src/api/generated/model/taskWithCompletionResponse.ts b/reading-platform-frontend/src/api/generated/model/taskWithCompletionResponse.ts new file mode 100644 index 0000000..7c8044a --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/taskWithCompletionResponse.ts @@ -0,0 +1,33 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ +import type { TaskFeedbackResponse } from './taskFeedbackResponse'; +import type { TaskInfo } from './taskInfo'; + +/** + * 家长端任务列表响应(含完成信息) + */ +export interface TaskWithCompletionResponse { + /** 任务ID */ + id?: number; + /** 完成状态:PENDING-待提交/SUBMITTED-已提交/REVIEWED-已评价 */ + status?: string; + /** 提交时间 */ + submittedAt?: string; + /** 评价时间 */ + reviewedAt?: string; + /** 照片URL列表 */ + photos?: string[]; + /** 视频URL */ + videoUrl?: string; + /** 语音URL */ + audioUrl?: string; + /** 阅读心得/完成内容 */ + content?: string; + teacherFeedback?: TaskFeedbackResponse; + task?: TaskInfo; +} diff --git a/reading-platform-frontend/src/api/generated/model/teacherCreateRequest.ts b/reading-platform-frontend/src/api/generated/model/teacherCreateRequest.ts index 711d53f..6d82981 100644 --- a/reading-platform-frontend/src/api/generated/model/teacherCreateRequest.ts +++ b/reading-platform-frontend/src/api/generated/model/teacherCreateRequest.ts @@ -10,18 +10,20 @@ * 教师创建请求 */ export interface TeacherCreateRequest { - /** 用户名 */ + /** 用户名/登录账号 */ username: string; /** 密码 */ password: string; /** 姓名 */ name: string; /** 电话 */ - phone?: string; + phone: string; /** 邮箱 */ email?: string; /** 性别 */ gender?: string; /** 简介 */ bio?: string; + /** 负责班级ID列表 */ + classIds?: number[]; } diff --git a/reading-platform-frontend/src/api/generated/model/teacherResponse.ts b/reading-platform-frontend/src/api/generated/model/teacherResponse.ts index 844d5ac..cf228d8 100644 --- a/reading-platform-frontend/src/api/generated/model/teacherResponse.ts +++ b/reading-platform-frontend/src/api/generated/model/teacherResponse.ts @@ -5,6 +5,7 @@ * Reading Platform Backend Service API Documentation * OpenAPI spec version: 1.0.0 */ +import type { TeacherResponseClassNames } from './teacherResponseClassNames'; /** * 教师响应 @@ -14,8 +15,6 @@ export interface TeacherResponse { id?: number; /** 租户 ID */ tenantId?: number; - /** 用户名 */ - username?: string; /** 姓名 */ name?: string; /** 电话 */ @@ -30,10 +29,18 @@ export interface TeacherResponse { bio?: string; /** 状态 */ status?: string; + /** 负责班级ID列表 */ + classIds?: number[]; + /** 负责班级名称 */ + classNames?: TeacherResponseClassNames; + /** 授课次数 */ + lessonCount?: number; /** 最后登录时间 */ lastLoginAt?: string; /** 创建时间 */ createdAt?: string; /** 更新时间 */ updatedAt?: string; + /** 登录账号 */ + loginAccount?: string; } diff --git a/reading-platform-frontend/src/api/generated/model/teacherResponseClassNames.ts b/reading-platform-frontend/src/api/generated/model/teacherResponseClassNames.ts new file mode 100644 index 0000000..1f56bfa --- /dev/null +++ b/reading-platform-frontend/src/api/generated/model/teacherResponseClassNames.ts @@ -0,0 +1,12 @@ +/** + * Generated by orval v8.5.3 🍺 + * Do not edit manually. + * Reading Platform API + * Reading Platform Backend Service API Documentation + * OpenAPI spec version: 1.0.0 + */ + +/** + * 负责班级名称 + */ +export type TeacherResponseClassNames = { [key: string]: unknown }; diff --git a/reading-platform-frontend/src/api/generated/model/teacherUpdateRequest.ts b/reading-platform-frontend/src/api/generated/model/teacherUpdateRequest.ts index 57d5c88..61ca4b1 100644 --- a/reading-platform-frontend/src/api/generated/model/teacherUpdateRequest.ts +++ b/reading-platform-frontend/src/api/generated/model/teacherUpdateRequest.ts @@ -24,4 +24,6 @@ export interface TeacherUpdateRequest { bio?: string; /** 状态 */ status?: string; + /** 负责班级ID列表 */ + classIds?: number[]; } diff --git a/reading-platform-frontend/src/api/generated/model/tenantCreateRequest.ts b/reading-platform-frontend/src/api/generated/model/tenantCreateRequest.ts index 07c08d7..b8aeb78 100644 --- a/reading-platform-frontend/src/api/generated/model/tenantCreateRequest.ts +++ b/reading-platform-frontend/src/api/generated/model/tenantCreateRequest.ts @@ -26,8 +26,6 @@ export interface TenantCreateRequest { address?: string; /** Logo URL */ logoUrl?: string; - /** 套餐类型 */ - packageType?: string; /** 教师配额 */ teacherQuota?: number; /** 学生配额 */ @@ -36,6 +34,6 @@ export interface TenantCreateRequest { startDate?: string; /** 结束日期 */ expireDate?: string; - /** 课程套餐 ID(可选) */ - collectionId?: number; + /** 课程套餐 ID 列表(可选,支持多选) */ + collectionIds?: number[]; } diff --git a/reading-platform-frontend/src/api/generated/model/tenantResponse.ts b/reading-platform-frontend/src/api/generated/model/tenantResponse.ts index b9179f9..5b8c284 100644 --- a/reading-platform-frontend/src/api/generated/model/tenantResponse.ts +++ b/reading-platform-frontend/src/api/generated/model/tenantResponse.ts @@ -36,8 +36,8 @@ export interface TenantResponse { maxStudents?: number; /** 最大教师数 */ maxTeachers?: number; - /** 套餐类型 */ - packageType?: string; + /** 套餐名称列表 */ + packageNames?: string[]; /** 教师配额 */ teacherQuota?: number; /** 学生配额 */ diff --git a/reading-platform-frontend/src/api/generated/model/tenantUpdateRequest.ts b/reading-platform-frontend/src/api/generated/model/tenantUpdateRequest.ts index 59bffb7..6a805d2 100644 --- a/reading-platform-frontend/src/api/generated/model/tenantUpdateRequest.ts +++ b/reading-platform-frontend/src/api/generated/model/tenantUpdateRequest.ts @@ -24,10 +24,8 @@ export interface TenantUpdateRequest { logoUrl?: string; /** 状态 */ status?: string; - /** 套餐类型 */ - packageType?: string; /** 课程套餐ID(用于三层架构) */ - collectionId?: number; + collectionIds?: number[]; /** 教师配额 */ teacherQuota?: number; /** 学生配额 */ diff --git a/reading-platform-frontend/src/api/parent.ts b/reading-platform-frontend/src/api/parent.ts index 5e821c8..34babff 100644 --- a/reading-platform-frontend/src/api/parent.ts +++ b/reading-platform-frontend/src/api/parent.ts @@ -92,6 +92,7 @@ export interface TaskSubmitRequest { // 带完成信息的任务(兼容旧接口) export interface TaskWithCompletion { id: number; + studentId?: number; // 学生ID,多孩子聚合时用于标识任务归属 status: TaskCompletionStatus; completedAt?: string; feedback?: string; @@ -154,23 +155,41 @@ export const getChildProfile = (childId: number): Promise => export const getChildLessons = ( childId: number, - params?: { pageNum?: number; pageSize?: number } + params?: { pageNum?: number; pageSize?: number; page?: number } ): Promise<{ items: LessonRecord[]; total: number; page: number; pageSize: number }> => - http.get(`/v1/parent/children/${childId}/lessons`, { params }); + http.get<{ list: LessonRecord[]; total: number; pageNum: number; pageSize: number }>(`/v1/parent/children/${childId}/lessons`, { + params: { pageNum: params?.pageNum ?? params?.page ?? 1, pageSize: params?.pageSize ?? 10 }, + }).then(res => ({ + items: res.list || [], + total: res.total || 0, + page: res.pageNum || 1, + pageSize: res.pageSize || 10, + })); // ==================== 任务 API ==================== +/** 获取我的任务列表(聚合多孩子任务,无 childId 时使用) */ +export const getMyTasks = ( + params?: { pageNum?: number; pageSize?: number; status?: string } +): Promise<{ items: TaskWithCompletion[]; total: number; page: number; pageSize: number }> => + http.get<{ list: TaskWithCompletion[]; total: number; pageNum: number; pageSize: number }>('/v1/parent/tasks', { params }).then(res => ({ + items: res.list || [], + total: res.total || 0, + page: res.pageNum || 1, + pageSize: res.pageSize || 10, + })); + +/** 获取指定孩子的任务列表 */ export const getChildTasks = ( childId: number, params?: { pageNum?: number; pageSize?: number; status?: string } ): Promise<{ items: TaskWithCompletion[]; total: number; page: number; pageSize: number }> => - http.get<{ list: TaskWithCompletion[]; total: number; pageNum: number; pageSize: number }>(`/v1/parent/tasks/student/${childId}`, { params }) - .then(res => ({ - items: res.list || [], - total: res.total || 0, - page: res.pageNum || 1, - pageSize: res.pageSize || 10, - })); + http.get<{ list: TaskWithCompletion[]; total: number; pageNum: number; pageSize: number }>(`/v1/parent/tasks/student/${childId}`, { params }).then(res => ({ + items: res.list || [], + total: res.total || 0, + page: res.pageNum || 1, + pageSize: res.pageSize || 10, + })); // 提交任务完成(新版) export const submitTaskCompletion = ( @@ -233,8 +252,18 @@ export const getNotifications = ( unreadCount: number; page: number; pageSize: number; -}> => - http.get<{ list: Notification[]; total: number; pageNum: number; pageSize: number }>('/v1/parent/notifications', { params }) +}> => { + const queryParams: Record = { + pageNum: params?.pageNum ?? 1, + pageSize: params?.pageSize ?? 10, + }; + if (params?.isRead !== undefined) { + queryParams.isRead = params.isRead ? 1 : 0; + } + if (params?.notificationType) { + queryParams.notificationType = params.notificationType; + } + return http.get<{ list: Notification[]; total: number; pageNum: number; pageSize: number }>('/v1/parent/notifications', { params: queryParams }) .then(res => ({ items: res.list || [], total: res.total || 0, @@ -242,6 +271,7 @@ export const getNotifications = ( page: res.pageNum || 1, pageSize: res.pageSize || 10, })); +}; export const getUnreadCount = (): Promise => http.get('/v1/parent/notifications/unread-count').then(res => res || 0); diff --git a/reading-platform-frontend/src/api/school.ts b/reading-platform-frontend/src/api/school.ts index 5902931..4a766de 100644 --- a/reading-platform-frontend/src/api/school.ts +++ b/reading-platform-frontend/src/api/school.ts @@ -1260,8 +1260,13 @@ export const getParents = (params?: ParentQueryParams) => export const getParent = (id: number) => http.get(`/v1/school/parents/${id}`); -export const createParent = (data: CreateParentDto) => - http.post('/v1/school/parents', data); +export const createParent = (data: CreateParentDto) => { + const { loginAccount, ...rest } = data; + return http.post('/v1/school/parents', { + ...rest, + username: loginAccount, + }); +}; export const updateParent = (id: number, data: UpdateParentDto) => http.put(`/v1/school/parents/${id}`, data); @@ -1273,8 +1278,8 @@ export const resetParentPassword = (id: number) => http.post<{ tempPassword: string }>(`/v1/school/parents/${id}/reset-password`); export const getParentChildren = async (parentId: number): Promise => { - const parent = await http.get(`/v1/school/parents/${parentId}`); - return parent.children || []; + const list = await http.get(`/v1/school/parents/${parentId}/children`); + return Array.isArray(list) ? list : []; }; export const addChildToParent = (parentId: number, data: AddChildDto) => diff --git a/reading-platform-frontend/src/api/teacher.ts b/reading-platform-frontend/src/api/teacher.ts index b027cff..fadf618 100644 --- a/reading-platform-frontend/src/api/teacher.ts +++ b/reading-platform-frontend/src/api/teacher.ts @@ -122,6 +122,7 @@ export function getTeacherStudents(params?: { pageNum?: number; pageSize?: numbe } // 获取班级学生列表 +// 后端返回 { list, total, pageNum, pageSize, classInfo },前端统一为 { items, total, page, pageSize, class } export function getTeacherClassStudents(classId: number, params?: { pageNum?: number; pageSize?: number; keyword?: string }): Promise<{ items: Array<{ id: number; @@ -151,7 +152,13 @@ export function getTeacherClassStudents(classId: number, params?: { pageNum?: nu pageSize: params?.pageSize, keyword: params?.keyword, }, - }) as any; + }).then((res: any) => ({ + items: res?.list ?? res?.items ?? [], + total: res?.total ?? 0, + page: res?.pageNum ?? res?.page ?? 1, + pageSize: res?.pageSize ?? 10, + class: res?.classInfo ?? res?.class, + })); } // 获取班级教师列表 diff --git a/reading-platform-frontend/src/views/parent/DashboardView.vue b/reading-platform-frontend/src/views/parent/DashboardView.vue index 75d0cde..611b00b 100644 --- a/reading-platform-frontend/src/views/parent/DashboardView.vue +++ b/reading-platform-frontend/src/views/parent/DashboardView.vue @@ -11,9 +11,15 @@

关注孩子的阅读成长,陪伴每一步进步!

@@ -22,15 +28,12 @@
-

我的孩子

+

+ 我的孩子 +

-
+
{{ child.name.charAt(0) }} @@ -43,8 +46,12 @@
{{ child.class?.name || '未分班' }}
- {{ child.readingCount }} 次阅读 - {{ child.lessonCount }} 节课 + + {{ child.readingCount }} 次阅读 + + + {{ child.lessonCount }} 节课 +
@@ -62,11 +69,13 @@
-

最近任务

+

+ 最近任务 +

查看全部
-
+
{{ getStatusText(task.status) }}
@@ -87,7 +96,9 @@
-

成长档案

+

+ 成长档案 +

查看全部
@@ -126,7 +137,7 @@ import { RightOutlined, InboxOutlined, } from '@ant-design/icons-vue'; -import { getChildren, type ChildInfo } from '@/api/parent'; +import { getChildren, getMyTasks, getChildGrowthRecords, type ChildInfo, type TaskWithCompletion } from '@/api/parent'; import dayjs from 'dayjs'; const router = useRouter(); @@ -153,8 +164,8 @@ const getRelationshipText = (relationship: string) => { const statusMap: Record = { PENDING: { text: '待完成', class: 'status-pending' }, - IN_PROGRESS: { text: '进行中', class: 'status-progress' }, - COMPLETED: { text: '已完成', class: 'status-completed' }, + SUBMITTED: { text: '已提交', class: 'status-progress' }, + REVIEWED: { text: '已评价', class: 'status-completed' }, }; const getStatusText = (status: string) => statusMap[status]?.text || status; @@ -171,11 +182,13 @@ const goToChildDetail = (childId: number) => { }; const goToTasks = () => { - router.push('/parent/tasks'); + router.push('/parent/tasks'); // 任务页支持聚合视图,无需 childId }; const goToGrowth = () => { - router.push('/parent/growth'); + // 成长档案需要指定孩子,有孩子时传第一个 + const childId = children.value[0]?.id; + router.push(childId ? `/parent/growth?childId=${childId}` : '/parent/growth'); }; const loadData = async () => { @@ -184,9 +197,16 @@ const loadData = async () => { const data = await getChildren(); children.value = data; - // 如果有孩子,加载第一个孩子的任务和成长记录 + // 加载最近任务(聚合多孩子) + const tasksRes = await getMyTasks({ pageNum: 1, pageSize: 5 }); + recentTasks.value = tasksRes.items || []; + + // 加载第一个孩子的最近成长档案 if (data.length > 0) { - // 这里可以加载任务和成长记录 + const growthRes = await getChildGrowthRecords(data[0].id, { pageNum: 1, pageSize: 4 }); + recentGrowth.value = growthRes.items || []; + } else { + recentGrowth.value = []; } } catch (error: any) { message.error(error.response?.data?.message || '加载数据失败'); @@ -212,6 +232,7 @@ $primary-light: #f6ffed; $primary-dark: #389e0d; .parent-dashboard { + // 欢迎横幅 .welcome-banner { background: linear-gradient(135deg, $primary-color 0%, #73d13d 100%); @@ -550,6 +571,7 @@ $primary-dark: #389e0d; .task-content, .growth-content { + .task-title, .growth-title { font-size: 13px; diff --git a/reading-platform-frontend/src/views/parent/LayoutView.vue b/reading-platform-frontend/src/views/parent/LayoutView.vue index c7f0038..6628004 100644 --- a/reading-platform-frontend/src/views/parent/LayoutView.vue +++ b/reading-platform-frontend/src/views/parent/LayoutView.vue @@ -1,14 +1,8 @@