修改考试

This commit is contained in:
zhaolongfei
2024-05-28 18:13:54 +08:00
parent 8c283bc976
commit de0ff38302

View File

@@ -111,10 +111,10 @@ public class StudyExamServiceImpl implements IStudyExamService{
scItemDao.updateFieldById(exam.getStudyItemId(), "progress",prog);
}
if(prog==100){
scDao.updateFieldById(exam.getStudyId(), "progress",100.0f);
scDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now());
scDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH);
scDao.updateFieldById(exam.getStudyId(), "last_score",100.0f);
scItemDao.updateFieldById(exam.getStudyId(), "progress",100.0f);
scItemDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now());
scItemDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH);
scItemDao.updateFieldById(exam.getStudyId(), "score",100.0f);
}
}
@@ -125,10 +125,10 @@ public class StudyExamServiceImpl implements IStudyExamService{
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()){
scDao.updateFieldById(exam.getStudyId(), "progress",100.0f);
scDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now());
scDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH);
scDao.updateFieldById(exam.getStudyId(), "last_score",100.0f);
scItemDao.updateFieldById(exam.getStudyId(), "progress",100.0f);
scItemDao.updateFieldById(exam.getStudyId(), "finish_time",LocalDateTime.now());
scItemDao.updateFieldById(exam.getStudyId(), "status",StudyCourseItem.STATUS_FINISH);
scItemDao.updateFieldById(exam.getStudyId(), "score",exam.getPassLine());
}
}
List<StudyCourse> allUserList = thirdApi.getStudyCourseList(exam.getStudyId() ,exam.getCourseId(), token);