From 3e1547700e4abcb1be679009a36348ab906665ae Mon Sep 17 00:00:00 2001 From: maLix Date: Tue, 4 Jul 2023 00:13:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95=E3=80=81=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E3=80=81=E7=AB=A0=E8=8A=82=E7=BB=83=E4=B9=A0=20=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/sql/jlw/resourcesQuestionSnapshot.md | 7 ++++++- .../resources/sql/jlw/teacherOpenCourseQuestionSetting.md | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md b/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md index 31387917..952cd839 100644 --- a/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md +++ b/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md @@ -745,7 +745,12 @@ getQuestionTestSimpleInfo AND t.teacher_open_course_id = #teacherOpenCourseId# @if(!isEmpty(classIds)){ and IF - ( t.teacher_open_course_question_setting_school_class_ids = 'ALL', TRUE, t.teacher_open_course_question_setting_school_class_ids REGEXP #strUtil.join('|', classIds)#) + ( t.teacher_open_course_question_setting_school_class_ids = 'ALL', TRUE, + @for(var classId in strUtil.split(classIds, ',')) { + find_in_set(#classId#, t.teacher_open_course_question_setting_school_class_ids) or + @} + @// 用来拼接最后的or + false ) @} AND ( select count(distinct(tb.resources_question_snapshot_id)) from resources_question_snapshot tb where tb.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md index 1bde4373..4914a60f 100644 --- a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md @@ -118,7 +118,12 @@ queryByConditionQuery @// 如果数据是ALL,则代表全部班级都可以看到 @if(!isEmpty(teacherOpenCourseQuestionSettingSchoolClassIds)){ and IF - ( t.teacher_open_course_question_setting_school_class_ids = 'ALL', TRUE, t.teacher_open_course_question_setting_school_class_ids REGEXP #strUtil.join('|', teacherOpenCourseQuestionSettingSchoolClassIds)#) + ( t.teacher_open_course_question_setting_school_class_ids = 'ALL', TRUE, + @for(var classId in strUtil.split(teacherOpenCourseQuestionSettingSchoolClassIds, ',')) { + find_in_set(#classId#, t.teacher_open_course_question_setting_school_class_ids) or + @} + @// 用来拼接最后的or + false ) @} @if(!isEmpty(teacherOpenCourseQuestionSettingDoCount)){ and t.teacher_open_course_question_setting_do_count =#teacherOpenCourseQuestionSettingDoCount#