Commit 182bdbde authored by luzhuang's avatar luzhuang

已发布课程删除最后一节(节被切割)报错捕获

parent 2a9fc677
...@@ -706,7 +706,11 @@ public class BChapterServiceImpl implements BChapterService { ...@@ -706,7 +706,11 @@ public class BChapterServiceImpl implements BChapterService {
// 根据chapter_id 删除b_r_student_chapter // 根据chapter_id 删除b_r_student_chapter
// brStudentChapterRepository.deleteBatchByChapterId(id); // brStudentChapterRepository.deleteBatchByChapterId(id);
// 更新学生 对应章节总进度 // 更新学生 对应章节总进度
try{
this.updateLessonProgress(lessonId, false, id); this.updateLessonProgress(lessonId, false, id);
}catch (Exception e){
throw new ServiceException(ResultServiceEnums.CHAPTER_ONLY_ONES);
}
} }
//删除student_chapter表中数据 //删除student_chapter表中数据
......
...@@ -261,6 +261,7 @@ public enum ResultServiceEnums { ...@@ -261,6 +261,7 @@ public enum ResultServiceEnums {
NOT_DOWNLOAD_FILE(161,"无下载文件"), NOT_DOWNLOAD_FILE(161,"无下载文件"),
ZHIXIN_ERROR(162,"调用智信接口异常"), ZHIXIN_ERROR(162,"调用智信接口异常"),
NO_LECTURE(163,"当前培训无讲师"), NO_LECTURE(163,"当前培训无讲师"),
CHAPTER_ONLY_ONES(164,"当前课程仅有一节(节被切割),不能被删除"),
; ;
private Integer code; private Integer code;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment