From 101ec1d18e6069c03e0e65b0b6146df07d1f7b75 Mon Sep 17 00:00:00 2001
From: Mlxa0324 <mlx950324@163.com>
Date: Mon, 20 Mar 2023 23:56:28 +0800
Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=81=E9=A2=98=E7=9B=AE=E9=85=8D?=
 =?UTF-8?q?=E7=BD=AE=E5=AD=A6=E7=94=9F=E7=AB=AF=E5=88=97=E8=A1=A8=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 web/src/main/resources/sql/jlw/courseInfo.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/web/src/main/resources/sql/jlw/courseInfo.md b/web/src/main/resources/sql/jlw/courseInfo.md
index edf9375e..be0e9646 100644
--- a/web/src/main/resources/sql/jlw/courseInfo.md
+++ b/web/src/main/resources/sql/jlw/courseInfo.md
@@ -706,9 +706,10 @@ examCourseQuestionDO
 
   SELECT
   t.*,
+  @// 关联的题目总数量
   ( SELECT count( 1 ) FROM general_resources_question_snapshot tb 
     WHERE tb.business_course_info_id = t.course_info_id 
-      AND tb.general_question_setting_id = ta.general_question_setting_id ) AS question_count
+      AND tb.general_question_setting_id = ta.general_question_setting_id AND tb.question_status = 1) AS question_count
   FROM
   course_info t
   LEFT JOIN course_label tb on tb.course_label_id = t.course_label_id