课程列表-修改章节时修改视频
This commit is contained in:
@@ -112,6 +112,16 @@ public class CourseController {
|
||||
@RequestMapping("/editCourseCatalogueChapter")
|
||||
public R editCourseCatalogueChapter(@RequestBody CourseCatalogueChapterEntity courseCatalogueChapterEntity){
|
||||
courseCatalogueChapterService.updateById(courseCatalogueChapterEntity);
|
||||
//修改视频
|
||||
if (courseCatalogueChapterEntity.getVideoList()!=null&&courseCatalogueChapterEntity.getVideoList().size() > 0){
|
||||
for (CourseCatalogueChapterVideoEntity c:courseCatalogueChapterEntity.getVideoList()) {
|
||||
if (c.getId()==0){
|
||||
courseCatalogueChapterVideoService.save(c);
|
||||
}else {
|
||||
courseCatalogueChapterVideoService.updateById(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user