Commit 182bdbde authored by luzhuang's avatar luzhuang

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

parent 2a9fc677
......@@ -706,7 +706,11 @@ public class BChapterServiceImpl implements BChapterService {
// 根据chapter_id 删除b_r_student_chapter
// brStudentChapterRepository.deleteBatchByChapterId(id);
// 更新学生 对应章节总进度
this.updateLessonProgress(lessonId, false, id);
try{
this.updateLessonProgress(lessonId, false, id);
}catch (Exception e){
throw new ServiceException(ResultServiceEnums.CHAPTER_ONLY_ONES);
}
}
//删除student_chapter表中数据
......
......@@ -261,6 +261,7 @@ public enum ResultServiceEnums {
NOT_DOWNLOAD_FILE(161,"无下载文件"),
ZHIXIN_ERROR(162,"调用智信接口异常"),
NO_LECTURE(163,"当前培训无讲师"),
CHAPTER_ONLY_ONES(164,"当前课程仅有一节(节被切割),不能被删除"),
;
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