Commit 6d27f7fc authored by luzhuang's avatar luzhuang

添加日志

parent 75009031
......@@ -295,18 +295,19 @@ public class BChapterServiceImpl implements BChapterService {
UserUtil.setCurrentMergeOperation(model);
bFile.setChapterId(model.getBusinessId());
UserUtil.setCurrentMergeOperation(bFile);
model.setCourseTime(dto.getFileTime());
model.setIsTest(dto.getType());
if (StringUtils.isNotEmpty(dto.getFileTime()) && dto.getFileTime().contains(".")) {
model.setCourseTime(dto.getFileTime().substring(0, dto.getFileTime().lastIndexOf(".")));
bFile.setFileTime(dto.getFileTime().substring(0, dto.getFileTime().lastIndexOf(".")));
}
//先判断该课程的第一节是否是本节 更新blesson表中course_time字段
String cid = bChapterRepository.getFirstChapter(model.getLessonId());
log.debug("--------------------------------第一节id--------:"+cid);
log.debug("------------------------------当前章节id--------:"+model.getBusinessId());
if (model.getBusinessId().equals(cid)) {
bChapterRepository.updateVideoTimeInLesson(model.getCourseTime(), model.getLessonId());
int linex = bChapterRepository.updateVideoTimeInLesson(model.getCourseTime(), model.getLessonId());
log.debug("----------------------更新lesson表中第一节时长--"+(linex==0?"失败":"成功")+"----------");
log.debug("--------------------------时长-----------:"+model.getCourseTime());
}
line = bChapterRepository.updateByPrimaryKeySelective(model);
......@@ -330,6 +331,7 @@ public class BChapterServiceImpl implements BChapterService {
bLessonPersonRepository.updateByPrimaryKeySelective(lessonPerson);
studentChapter.setProgress(0);
brStudentChapterRepository.updateById(studentChapter);
}
}
}
......@@ -412,7 +414,7 @@ public class BChapterServiceImpl implements BChapterService {
String secondId = bChapterRepository.getFirstChapter(lessonId);
String time = bChapterRepository.getTimeByChapterId(secondId);
//更新到b_lesson 表
bChapterRepository.updateCourseTimeForLesson(time,lessonId);
bChapterRepository.updateVideoTimeInLesson(time,lessonId);
// 更新学生 对应章节总进度
this.updateLessonProgress(lessonId, false);
//删除student_chapter表中数据
......
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