|
@@ -126,16 +126,11 @@ public class CourseController extends JeecgController<Course, ICourseService> {
|
|
@ApiOperation(value = "course-通过id查询", notes = "course-通过id查询")
|
|
@ApiOperation(value = "course-通过id查询", notes = "course-通过id查询")
|
|
@GetMapping(value = "/queryById")
|
|
@GetMapping(value = "/queryById")
|
|
public Result<Course> queryById(@RequestParam(name = "id", required = true) String id) {
|
|
public Result<Course> queryById(@RequestParam(name = "id", required = true) String id) {
|
|
- Course course = courseService.getById(id);
|
|
|
|
|
|
+ Course course = courseService.queryById(id);
|
|
if (course == null) {
|
|
if (course == null) {
|
|
return Result.error("未找到对应数据");
|
|
return Result.error("未找到对应数据");
|
|
}
|
|
}
|
|
course.setCatalogList(courseCatalogService.listByCourseId(course.getId()));
|
|
course.setCatalogList(courseCatalogService.listByCourseId(course.getId()));
|
|
-
|
|
|
|
- if (StringUtils.isNotBlank(course.getExamId())) {
|
|
|
|
- Exam exam = examService.getById(course.getExamId());
|
|
|
|
- course.setExamTitle(!Objects.isNull(exam) ? exam.getTitle() : null);
|
|
|
|
- }
|
|
|
|
return Result.OK(course);
|
|
return Result.OK(course);
|
|
}
|
|
}
|
|
|
|
|