| | |
| | | } |
| | | ExExamPaper examPaper = examPaperMapper.selectById(paperStudent.getPaperId()); |
| | | if(examPaper.getLimited()==1){ |
| | | if(paperStudent.getStartTime()!=null && (currentDateTime-paperStudent.getStartTime()>=examPaper.getLimitTime()*60*1000)){ |
| | | // paperStudent.setCompleted(1); |
| | | // paperStudentMapper.updateById(paperStudent); |
| | | throw new ApiException("考试已超时,不能再考试"); |
| | | } |
| | | // if(paperStudent.getStartTime()!=null && (currentDateTime-paperStudent.getStartTime()>=examPaper.getLimitTime()*60*1000)){ |
| | | //// paperStudent.setCompleted(1); |
| | | //// paperStudentMapper.updateById(paperStudent); |
| | | // throw new ApiException("考试已超时,不能再考试"); |
| | | // } |
| | | LocalDateTime deadline = examPaper.getDeadline(); |
| | | if(currentDateTime-deadline.toInstant(ZoneOffset.of("+8")).toEpochMilli()>0){ |
| | | // paperStudent.setCompleted(1); |