课程列表-修改章节时修改视频

This commit is contained in:
wuchunlei
2024-06-12 10:16:30 +08:00
parent 1fdb25fc2e
commit 2c9dc87e83

View File

@@ -112,6 +112,16 @@ public class CourseController {
@RequestMapping("/editCourseCatalogueChapter") @RequestMapping("/editCourseCatalogueChapter")
public R editCourseCatalogueChapter(@RequestBody CourseCatalogueChapterEntity courseCatalogueChapterEntity){ public R editCourseCatalogueChapter(@RequestBody CourseCatalogueChapterEntity courseCatalogueChapterEntity){
courseCatalogueChapterService.updateById(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(); return R.ok();
} }