mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 10:56:50 +08:00
修改bug
This commit is contained in:
@@ -118,25 +118,25 @@ public class StudyExamServiceImpl implements IStudyExamService{
|
|||||||
scItemDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now());
|
scItemDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now());
|
||||||
scItemDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH);
|
scItemDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH);
|
||||||
scItemDao.updateFieldById(exam.getStudyId(), "score",100.0f);
|
scItemDao.updateFieldById(exam.getStudyId(), "score",100.0f);
|
||||||
scDao.updateFieldById(exam.getStudyId(), "last_score",100.0f);
|
//scDao.updateFieldById(exam.getStudyId(), "last_score",100.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//1最高一次,用于最高一次的计算
|
//1最高一次,用于最高一次的计算
|
||||||
if(cexam.getScoringType()==CourseExam.SCORINGTYPE_MAX) {
|
if(cexam.getScoringType()==CourseExam.SCORINGTYPE_MAX) {
|
||||||
Float f=(Float)dao.findField("max(score)", FieldFilters.eq("contentId", exam.getContentId()));
|
Float f=(Float)dao.findField("max(score)", FieldFilters.eq("contentId", exam.getContentId()));
|
||||||
scItemDao.updateFieldById(exam.getStudyItemId(), "score", f);
|
scItemDao.updateFieldById(exam.getStudyItemId(), "score", f);
|
||||||
scItemDao.updateFieldById(exam.getStudyItemId(), "status", f>=exam.getPassLine()?StudyCourseItem.STATUS_FINISH:StudyCourseItem.STATUS_STUDYING);
|
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());
|
scItemDao.updateFieldById(exam.getStudyItemId(), "progress",f>=exam.getPassLine()?100:f.intValue());
|
||||||
|
|
||||||
if(f>=exam.getPassLine()){
|
if(f>=exam.getPassLine()){
|
||||||
scItemDao.updateFieldById(exam.getStudyId(), "progress",100);
|
scItemDao.updateFieldById(exam.getStudyId(), "progress",100);
|
||||||
scItemDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now());
|
scItemDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now());
|
||||||
scItemDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH);
|
scItemDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH);
|
||||||
scItemDao.updateFieldById(exam.getStudyId(), "score",100.0f);
|
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记录
|
//执行完毕 清除redis记录
|
||||||
// redisTemplate.delete(key);
|
// redisTemplate.delete(key);
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
Reference in New Issue
Block a user