deason 3 سال پیش
والد
کامیت
c96a27124a

+ 12 - 3
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/exam_record_data/ExamRecordDataTool.java

@@ -42,10 +42,11 @@ public class ExamRecordDataTool {
                 .append(" inner join ec_b_org org on org.id = t.root_org_id")
                 .append(" where 1=1")
                 .append(" and t.creation_time >= '2022-05-08 00:00:00'")
-                .append(" and t.creation_time <= '2022-05-08 18:00:00'")
+                .append(" and t.creation_time <= '2022-05-08 20:00:00'")
                 .append(" and t.sync_status = 'UNSYNC'")
-                .append(" order by t.root_org_id,t.exam_id");
-        // .append(" limit 3");
+                // .append(" order by t.root_org_id,t.exam_id")
+                // .append(" limit 10")
+                .append(" ");
 
         List<ExamRecordDataVO> allList = jdbcTemplate.query(querySql.toString(), new BeanPropertyRowMapper(ExamRecordDataVO.class));
         System.out.println("total is " + allList.size());
@@ -54,6 +55,14 @@ public class ExamRecordDataTool {
         for (int i = 0; i < allList.size(); i++) {
             ExamRecordDataVO vo = allList.get(i);
 
+            // String examingSessionKey = String.format("OE_SESSION:%s", vo.getStudentId());
+            // if (redisTemplate.hasKey(examingSessionKey)) {
+            //     // 若此缓存存在,则登录后会进入断点,需要排除清理!
+            //     System.out.println("考试会话缓存仍存在! key = " + examingSessionKey);
+            //     errList.add(vo);
+            // }
+            // if (true) return;
+
             String examRecordDataKey = String.format("OE_ERD:%s", vo.getId());
             String studentPaperKey = String.format("OE_PAPER:%s", vo.getId());
 

+ 6 - 0
src/test/java/cn/com/qmth/dp/examcloud/oe/test/ExportTest.java

@@ -1,6 +1,7 @@
 package cn.com.qmth.dp.examcloud.oe.test;
 
 import cn.com.qmth.dp.examcloud.oe.OeToolApplication;
+import cn.com.qmth.dp.examcloud.oe.modules.exam_record_data.ExamRecordDataTool;
 import cn.com.qmth.dp.examcloud.oe.modules.export_exam_student_score.ExportExamStudentScore;
 import cn.com.qmth.dp.examcloud.oe.modules.fixExamStudentId.FixExamStudentId;
 import cn.com.qmth.dp.examcloud.oe.modules.get_student_answer_detail.GetStduentAnswerDetailService;
@@ -31,9 +32,14 @@ public class ExportTest {
     @Autowired
     private FixExamStudentId fixExamStudentId;
 
+    @Autowired
+    private ExamRecordDataTool examRecordDataTool;
+
     @Test
     public void exportTest() throws Exception {
 
+        // examRecordDataTool.start();
+
         // fixCorrectAnswerAndResetScoreService.start();
 
         // 导出 - 成绩明细 带小题分