|
@@ -66,7 +66,25 @@ update wq_question_answer_item INNER JOIN temp_old_data on wq_question_answer_it
|
|
|
set wq_question_answer_item.answer_text= temp_old_data.content;
|
|
|
|
|
|
#必要步骤
|
|
|
-java代码更新属性树新加的字段rootId
|
|
|
+建要处理的科目临时表
|
|
|
+CREATE TABLE `temp_subject` (
|
|
|
+ `ec_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
|
+ `yun_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
|
|
|
+ `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
|
|
|
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
|
|
|
+检查是否有包含公式的题
|
|
|
+select q.id,q.question_type,q.topic,q.difficulty,q.answer
|
|
|
+ from wq_question_bank_subject t left join wq_subject sub on t.subject_id=sub.id
|
|
|
+ left join wq_question_bank b on t.question_bank_id=b.id
|
|
|
+ left join wq_question_question_bank f on t.question_bank_id=f.question_bank_id
|
|
|
+ left join wq_question q on f.question_id=q.id
|
|
|
+ left join wq_question_answer_item an on q.id=an.question_id
|
|
|
+where 1=1
|
|
|
+and sub.subject_code in (select yun_code from temp_subject)
|
|
|
+and b.rent_id=811 and b.is_deleted=0 and q.is_deleted=0 and q.rent_id=811
|
|
|
+and (q.topic like '%$$%' or q.answer like '%$$%' or an.answer_text like '%$$%');
|
|
|
+
|
|
|
+java代码更新属性树wq_knowledge_system新加的字段root_id
|
|
|
update wq_question INNER JOIN temp_gs on wq_question.id=temp_gs.id
|
|
|
set wq_question.topic= CONCAT_WS('',temp_gs.content1,temp_gs.content2,temp_gs.content3,temp_gs.content4);
|
|
|
|