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();