yin 2 luni în urmă
părinte
comite
79298f93c5

+ 2 - 2
distributed-print/install/mysql/init/teachcloud_db.sql

@@ -2612,14 +2612,14 @@ CREATE TABLE IF NOT EXISTS `scan_refix_batch` (
 -- ----------------------------
 CREATE TABLE IF NOT EXISTS `scan_student_paper` (
   `id` bigint NOT NULL,
-  `student_id` bigint NOT NULL,
+  `student_id` bigint NOT NULL,scan_student
   `paper_index` int NOT NULL,
   `paper_id` bigint NOT NULL,
   `create_time` bigint DEFAULT NULL,
   `update_time` bigint DEFAULT NULL,
   PRIMARY KEY (`id`) USING BTREE,
   UNIQUE KEY `paper_id` (`paper_id`) USING BTREE,
-  KEY `index1` (`student_id`,`paper_index`) USING BTREE
+  UNIQUE KEY `index1` (`student_id`,`paper_index`) USING BTREE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
 
 -- ----------------------------

+ 1 - 3
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -938,9 +938,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
         }
         if (CollectionUtils.isNotEmpty(studentPaperList)) {
             // 保存绑定关系
-            for (ScanStudentPaper studentPaper:studentPaperList) {
-                studentPaperService.saveOrUpdate(studentPaper);
-            }
+            studentPaperService.saveOrUpdateBatch(studentPaperList);
         }
         // 更新考生状态
         updateStudentByPaper(user.getId(), id, true, false, true);