diff --git a/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md b/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md index 02cb2948..31387917 100644 --- a/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md +++ b/web/src/main/resources/sql/jlw/resourcesQuestionSnapshot.md @@ -744,7 +744,8 @@ getQuestionTestSimpleInfo AND t.teacher_open_course_question_setting_type = #teacherOpenCourseQuestionSettingType# AND t.teacher_open_course_id = #teacherOpenCourseId# @if(!isEmpty(classIds)){ - and find_in_set(t.teacher_open_course_question_setting_school_class_ids, #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)#) @} 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 f0e495a0..1bde4373 100644 --- a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionSetting.md @@ -115,8 +115,10 @@ queryByConditionQuery @if(!isEmpty(teacherOpenCourseIdPlural)){ and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) @} + @// 如果数据是ALL,则代表全部班级都可以看到 @if(!isEmpty(teacherOpenCourseQuestionSettingSchoolClassIds)){ - and find_in_set(t.teacher_open_course_question_setting_school_class_ids, #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)#) @} @if(!isEmpty(teacherOpenCourseQuestionSettingDoCount)){ and t.teacher_open_course_question_setting_do_count =#teacherOpenCourseQuestionSettingDoCount#