[AppleScript] 纯文本查看 复制代码
//课程视图查询
public CourseView getCoruseView(String id) {
CourseView courseView = new CourseView();
//查询课程基本信息
Optional<CourseBase> optional = courseBaseRepository.findById(id);
if(optional.isPresent()){
CourseBase courseBase = optional.get();
courseView.setCourseBase(courseBase);
}
//查询课程营销信息
Optional<CourseMarket> courseMarketOptional = courseMarketRepository.findById(id);
if(courseMarketOptional.isPresent()){
CourseMarket courseMarket = courseMarketOptional.get();
courseView.setCourseMarket(courseMarket);
}
//查询课程图片信息
Optional<CoursePic> picOptional = coursePicRepository.findById(id);
if(picOptional.isPresent()){
CoursePic coursePic = picOptional.get();
courseView.setCoursePic(picOptional.get());
}
//查询课程计划信息
TeachplanNode teachplanNode = teachplanMapper.selectList(id);
courseView.setTeachplanNode(teachplanNode);
return courseView;
}