Browse Source

加入修改job

wangliang 2 years ago
parent
commit
62bfc1ea56

+ 0 - 1
themis-admin/src/main/java/com/qmth/themis/admin/api/TEExamController.java

@@ -824,7 +824,6 @@ public class TEExamController {
                         TEStudentCacheDto teStudent = cacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
                         TEStudentCacheDto teStudent = cacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
                         commonService.persisted(t.getId(), teStudent.getId());
                         commonService.persisted(t.getId(), teStudent.getId());
                     } catch (Exception e) {
                     } catch (Exception e) {
-                        log.error(SystemConstant.LOG_ERROR, e);
                     }
                     }
                 }
                 }
             }
             }

+ 9 - 0
themis-business/src/main/java/com/qmth/themis/business/service/impl/CommonServiceImpl.java

@@ -69,6 +69,15 @@ public class CommonServiceImpl implements CommonService {
 
 
         try {
         try {
             ExamRecordStatusEnum status = ExamRecordCacheUtil.getStatus(recordId);
             ExamRecordStatusEnum status = ExamRecordCacheUtil.getStatus(recordId);
+            if (Objects.isNull(status)) {
+                if (Objects.equals(recordId, ExamingDataCacheUtil.getUnFinishedRecordId(studentId))) {
+                    ExamingDataCacheUtil.deleteUnFinishedRecordId(studentId);
+                }
+                if (Objects.equals(recordId, ExamingDataCacheUtil.getExamingRecordId(studentId))) {
+                    ExamingDataCacheUtil.deleteExamingRecordId(studentId);
+                }
+                return;
+            }
             if (!ExamRecordStatusEnum.FINISHED.equals(status)) {
             if (!ExamRecordStatusEnum.FINISHED.equals(status)) {
                 log.info("status error ,status:" + status.name() + " recordId:" + recordId);
                 log.info("status error ,status:" + status.name() + " recordId:" + recordId);
                 return;
                 return;

+ 0 - 3
themis-task/src/main/java/com/qmth/themis/task/quartz/RepairJob.java

@@ -66,7 +66,6 @@ public class RepairJob extends QuartzJobBean {
                         TEStudentCacheDto teStudent = cacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
                         TEStudentCacheDto teStudent = cacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
                         commonService.persisted(t.getId(), teStudent.getId());
                         commonService.persisted(t.getId(), teStudent.getId());
                     } catch (Exception e) {
                     } catch (Exception e) {
-                        log.error(SystemConstant.LOG_ERROR, e);
                     }
                     }
                 }
                 }
             }
             }
@@ -88,7 +87,6 @@ public class RepairJob extends QuartzJobBean {
                         tOeExamRecordService.saveDataByCachePersistedAnswer(t.getId());
                         tOeExamRecordService.saveDataByCachePersistedAnswer(t.getId());
                     }
                     }
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    log.error(SystemConstant.LOG_ERROR, e);
                 }
                 }
             }
             }
         }
         }
@@ -105,7 +103,6 @@ public class RepairJob extends QuartzJobBean {
                 try {
                 try {
                     teExamStudentService.updateExamStudentByCache(t.getId());
                     teExamStudentService.updateExamStudentByCache(t.getId());
                 } catch (Exception e) {
                 } catch (Exception e) {
-                    log.error(SystemConstant.LOG_ERROR, e);
                 }
                 }
             }
             }
         }
         }