|
@@ -534,16 +534,16 @@ public class ExamRecordCacheUtil {
|
|
|
public static void setClientCurrentIp(Long recordId, String ip) {
|
|
|
if (Objects.nonNull(getId(recordId)) && (Objects.nonNull(ip) && !Objects.equals(ip.trim(), "") && !Objects.equals(ip.trim(), "0:0:0:0:0:0:0:1") && !Objects.equals(ip.trim(), "127.0.0.1")
|
|
|
&& !Objects.equals(ip.trim(), "localhost"))) {
|
|
|
- String historyIp = getClientCurrentIp(recordId);
|
|
|
- if (Objects.nonNull(historyIp) && !Objects.equals(historyIp.trim(), "") && !Objects.equals(historyIp.trim(), ip.trim())) {
|
|
|
- Long examId = getExamId(recordId);
|
|
|
- Long examActivityId = getExamActivityId(recordId);
|
|
|
- Long examStudentId = getExamStudentId(recordId);
|
|
|
- TIeInvigilateWarnInfoService tIeInvigilateWarnInfoService = SpringContextHolder.getBean(TIeInvigilateWarnInfoService.class);
|
|
|
- //ip不同则发生预警
|
|
|
- TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, VerifyExceptionEnum.IP_CHANGE_ERROR.getLevel().get(0), VerifyExceptionEnum.IP_CHANGE_ERROR.getTitle(), VerifyExceptionEnum.IP_CHANGE_ERROR, 1);
|
|
|
- tIeInvigilateWarnInfoService.saveOrUpdate(tIeInvigilateWarnInfo);
|
|
|
- }
|
|
|
+// String historyIp = getClientCurrentIp(recordId);
|
|
|
+// if (Objects.nonNull(historyIp) && !Objects.equals(historyIp.trim(), "") && !Objects.equals(historyIp.trim(), ip.trim())) {
|
|
|
+// Long examId = getExamId(recordId);
|
|
|
+// Long examActivityId = getExamActivityId(recordId);
|
|
|
+// Long examStudentId = getExamStudentId(recordId);
|
|
|
+// TIeInvigilateWarnInfoService tIeInvigilateWarnInfoService = SpringContextHolder.getBean(TIeInvigilateWarnInfoService.class);
|
|
|
+// //ip不同则发生预警
|
|
|
+// TIeInvigilateWarnInfo tIeInvigilateWarnInfo = new TIeInvigilateWarnInfo(examId, examActivityId, recordId, examStudentId, VerifyExceptionEnum.IP_CHANGE_ERROR.getLevel().get(0), VerifyExceptionEnum.IP_CHANGE_ERROR.getTitle(), VerifyExceptionEnum.IP_CHANGE_ERROR, 1);
|
|
|
+// tIeInvigilateWarnInfoService.saveOrUpdate(tIeInvigilateWarnInfo);
|
|
|
+// }
|
|
|
redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.client_current_ip.getCode(),
|
|
|
ip.trim());
|
|
|
}
|