From cd9df0f9aae0d3ddf4962241058aef885bd00ec8 Mon Sep 17 00:00:00 2001 From: wenyu441069198 <14186472+wenyu441069198@user.noreply.gitee.com> Date: Mon, 5 Aug 2024 16:21:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=82=96=E6=B5=B7=E5=8D=97=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B0=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/controller/courses/CoursesController.java | 4 ++-- .../records/KnowledgeLearningRecordController.java | 2 ++ .../teaching/backend/service/courses/ICoursesService.java | 2 +- .../backend/service/impl/courses/CoursesServiceImpl.java | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/teaching/backend/controller/courses/CoursesController.java b/src/main/java/com/teaching/backend/controller/courses/CoursesController.java index 8840c0c..9809dd5 100644 --- a/src/main/java/com/teaching/backend/controller/courses/CoursesController.java +++ b/src/main/java/com/teaching/backend/controller/courses/CoursesController.java @@ -131,8 +131,8 @@ public class CoursesController { @ApiOperation("查询学生列表") @PostMapping("/studentList") - public CommonResult> getStudentList(CourseQuery courseQuery){ - LinkedHashSet umsStudentList = coursesService.queryStudentList(courseQuery); + public CommonResult> getStudentList(@RequestParam String userId){ + LinkedHashSet umsStudentList = coursesService.queryStudentList(userId); return CommonResult.success(umsStudentList); } diff --git a/src/main/java/com/teaching/backend/controller/records/KnowledgeLearningRecordController.java b/src/main/java/com/teaching/backend/controller/records/KnowledgeLearningRecordController.java index 7d6aba9..867889c 100644 --- a/src/main/java/com/teaching/backend/controller/records/KnowledgeLearningRecordController.java +++ b/src/main/java/com/teaching/backend/controller/records/KnowledgeLearningRecordController.java @@ -52,4 +52,6 @@ public class KnowledgeLearningRecordController { public BaseResponse deleteRecords(@RequestParam List ids){ return knowledgeLearningRecordService.removeKnowledgeRecord(ids); } + + } diff --git a/src/main/java/com/teaching/backend/service/courses/ICoursesService.java b/src/main/java/com/teaching/backend/service/courses/ICoursesService.java index 9a06641..11ec74f 100644 --- a/src/main/java/com/teaching/backend/service/courses/ICoursesService.java +++ b/src/main/java/com/teaching/backend/service/courses/ICoursesService.java @@ -46,5 +46,5 @@ public interface ICoursesService extends IService { Map getPagePageSize2(int page, int pageSize); - LinkedHashSet queryStudentList(CourseQuery courseQuery); + LinkedHashSet queryStudentList(String userId); } diff --git a/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java index 3504a58..dc52e6d 100644 --- a/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java @@ -352,8 +352,10 @@ public class CoursesServiceImpl extends ServiceImpl impl } @Override - public LinkedHashSet queryStudentList(CourseQuery courseQuery) { - String roleId = umsUserMapper.getbyIdRoleId(courseQuery.getUserId()); + public LinkedHashSet queryStudentList(String userId) { + String roleId = umsUserMapper.getbyIdRoleId(userId); + CourseQuery courseQuery = new CourseQuery(); + courseQuery.setUserId(userId); if (roleId.equals("1")){ PageDTO queryCourses = queryCourses(courseQuery); List coursesList = queryCourses.getList();