肖海南学生列表小修改

master
wenyu441069198 4 months ago
parent 58d8f0b1cb
commit cd9df0f9aa
  1. 4
      src/main/java/com/teaching/backend/controller/courses/CoursesController.java
  2. 2
      src/main/java/com/teaching/backend/controller/records/KnowledgeLearningRecordController.java
  3. 2
      src/main/java/com/teaching/backend/service/courses/ICoursesService.java
  4. 6
      src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java

@ -131,8 +131,8 @@ public class CoursesController {
@ApiOperation("查询学生列表") @ApiOperation("查询学生列表")
@PostMapping("/studentList") @PostMapping("/studentList")
public CommonResult<LinkedHashSet<UmsStudent>> getStudentList(CourseQuery courseQuery){ public CommonResult<LinkedHashSet<UmsStudent>> getStudentList(@RequestParam String userId){
LinkedHashSet<UmsStudent> umsStudentList = coursesService.queryStudentList(courseQuery); LinkedHashSet<UmsStudent> umsStudentList = coursesService.queryStudentList(userId);
return CommonResult.success(umsStudentList); return CommonResult.success(umsStudentList);
} }

@ -52,4 +52,6 @@ public class KnowledgeLearningRecordController {
public BaseResponse<String> deleteRecords(@RequestParam List<Long> ids){ public BaseResponse<String> deleteRecords(@RequestParam List<Long> ids){
return knowledgeLearningRecordService.removeKnowledgeRecord(ids); return knowledgeLearningRecordService.removeKnowledgeRecord(ids);
} }
} }

@ -46,5 +46,5 @@ public interface ICoursesService extends IService<Courses> {
Map<String, Object> getPagePageSize2(int page, int pageSize); Map<String, Object> getPagePageSize2(int page, int pageSize);
LinkedHashSet<UmsStudent> queryStudentList(CourseQuery courseQuery); LinkedHashSet<UmsStudent> queryStudentList(String userId);
} }

@ -352,8 +352,10 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl
} }
@Override @Override
public LinkedHashSet<UmsStudent> queryStudentList(CourseQuery courseQuery) { public LinkedHashSet<UmsStudent> queryStudentList(String userId) {
String roleId = umsUserMapper.getbyIdRoleId(courseQuery.getUserId()); String roleId = umsUserMapper.getbyIdRoleId(userId);
CourseQuery courseQuery = new CourseQuery();
courseQuery.setUserId(userId);
if (roleId.equals("1")){ if (roleId.equals("1")){
PageDTO<CoursesVO> queryCourses = queryCourses(courseQuery); PageDTO<CoursesVO> queryCourses = queryCourses(courseQuery);
List<CoursesVO> coursesList = queryCourses.getList(); List<CoursesVO> coursesList = queryCourses.getList();

Loading…
Cancel
Save