Browse Source

3.2.5 bug修复

xiaofei 2 years ago
parent
commit
89f86f6ec9

+ 4 - 2
distributed-print-business/src/main/resources/db/log/脚本-xiaof.sql

@@ -41,9 +41,11 @@ where t.type = 'CUSTOM' and t.card_rule_id is null and t.id > 0;
 CREATE TABLE `exam_detail_course_paper_type` (
 CREATE TABLE `exam_detail_course_paper_type` (
       `id` BIGINT(20) NOT NULL,
       `id` BIGINT(20) NOT NULL,
       `exam_detail_course_id` BIGINT(20) NOT NULL,
       `exam_detail_course_id` BIGINT(20) NOT NULL,
-      `paper_type` VARCHAR(1) NOT NULL COMMENT '卷型',
+      `paper_type` VARCHAR(5) NOT NULL COMMENT '卷型',
       PRIMARY KEY (`id`));
       PRIMARY KEY (`id`));
 ALTER TABLE `exam_detail_course_paper_type`
 ALTER TABLE `exam_detail_course_paper_type`
-    ADD INDEX `idx_exam_detail_course_id` (`exam_detail_course_id` ASC) VISIBLE;
+    ADD INDEX `idx_exam_detail_course_id` (`exam_detail_course_id` ASC);
+
+insert into exam_detail_course_paper_type select id + cast(FLOOR(RAND()*10000000000000) as signed), id, paper_type from exam_detail_course where paper_type is not null and id>0;
 
 
 -----------------------3.2.5 end----------------------
 -----------------------3.2.5 end----------------------

+ 1 - 1
distributed-print-business/src/main/resources/mapper/ExamDetailCourseMapper.xml

@@ -32,7 +32,7 @@
             c.exposed_paper_type exposedPaperType,
             c.exposed_paper_type exposedPaperType,
             c.unexposed_paper_type unexposedPaperType,
             c.unexposed_paper_type unexposedPaperType,
             a.paper_type paperType,
             a.paper_type paperType,
-            ifnull(ed.print_count,0) printCount,
+            ifnull(ed.total_subjects,0) printCount,
             a.common_attachment_id commonAttachmentId
             a.common_attachment_id commonAttachmentId
         FROM
         FROM
             exam_detail ed
             exam_detail ed