考试、作业、章节练习 班级过滤条件bug修复

beetlsql3-dev
maLix 2 years ago
parent 090e7f57ee
commit 3e1547700e

@ -745,7 +745,12 @@ getQuestionTestSimpleInfo
AND t.teacher_open_course_id = #teacherOpenCourseId# AND t.teacher_open_course_id = #teacherOpenCourseId#
@if(!isEmpty(classIds)){ @if(!isEmpty(classIds)){
and IF 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 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 where tb.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id

@ -118,7 +118,12 @@ queryByConditionQuery
@// 如果数据是ALL则代表全部班级都可以看到 @// 如果数据是ALL则代表全部班级都可以看到
@if(!isEmpty(teacherOpenCourseQuestionSettingSchoolClassIds)){ @if(!isEmpty(teacherOpenCourseQuestionSettingSchoolClassIds)){
and IF 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)){ @if(!isEmpty(teacherOpenCourseQuestionSettingDoCount)){
and t.teacher_open_course_question_setting_do_count =#teacherOpenCourseQuestionSettingDoCount# and t.teacher_open_course_question_setting_do_count =#teacherOpenCourseQuestionSettingDoCount#

Loading…
Cancel
Save