diff --git a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyExamServiceImpl.java b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyExamServiceImpl.java index 4daed003..8aaacf91 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyExamServiceImpl.java +++ b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudyExamServiceImpl.java @@ -118,25 +118,25 @@ public class StudyExamServiceImpl implements IStudyExamService{ scItemDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now()); scItemDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH); scItemDao.updateFieldById(exam.getStudyId(), "score",100.0f); - scDao.updateFieldById(exam.getStudyId(), "last_score",100.0f); + //scDao.updateFieldById(exam.getStudyId(), "last_score",100.0f); } } - //1最高一次,用于最高一次的计算 if(cexam.getScoringType()==CourseExam.SCORINGTYPE_MAX) { Float f=(Float)dao.findField("max(score)", FieldFilters.eq("contentId", exam.getContentId())); scItemDao.updateFieldById(exam.getStudyItemId(), "score", f); scItemDao.updateFieldById(exam.getStudyItemId(), "status", f>=exam.getPassLine()?StudyCourseItem.STATUS_FINISH:StudyCourseItem.STATUS_STUDYING); scItemDao.updateFieldById(exam.getStudyItemId(), "progress",f>=exam.getPassLine()?100:f.intValue()); + if(f>=exam.getPassLine()){ scItemDao.updateFieldById(exam.getStudyId(), "progress",100); scItemDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now()); scItemDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH); scItemDao.updateFieldById(exam.getStudyId(), "score",100.0f); - scDao.updateFieldById(exam.getStudyId(), "last_score",100.0f); + //scDao.updateFieldById(exam.getStudyId(), "last_score",100.0f); } } - + scDao.updateFieldById(exam.getStudyId(), "last_score",exam.getScore()); //执行完毕 清除redis记录 // redisTemplate.delete(key); return "";