From 371f7b913ee3698e566122669512d3bb828941a5 Mon Sep 17 00:00:00 2001 From: Mlxa0324 Date: Mon, 27 Feb 2023 01:20:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=97=8F=E7=BB=83=E4=B9=A0=EF=BC=8C?= =?UTF-8?q?=E9=94=99=E9=A2=98=E7=BB=83=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...acherOpenCourseQuestionSettingService.java | 30 ++++++++++++++----- .../sql/jlw/teacherOpenCourseQuestionLog.md | 8 ++--- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionSettingService.java b/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionSettingService.java index 44f48d19..36e5764e 100644 --- a/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionSettingService.java +++ b/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseQuestionSettingService.java @@ -906,18 +906,32 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService list = teacherOpenCourseQuestionLogService.getValuesByQueryNotWithPermission(logQuery); + + if (ObjectUtil.isNotEmpty(list)) { + return BeanUtil.copyToList(list, ResourcesQuestionSnapshot.class); + } + } - logQuery.setStudentId(studentId); - logQuery.setTeacherOpenCourseQuestionLogStatus(1); - logQuery.setTeacherOpenCourseQuestionSettingId(questionSettingId); - List list = teacherOpenCourseQuestionLogService.getValuesByQueryNotWithPermission(logQuery); + // 错题库,本来是一张表管理的。 + else if(ERROR_TEST.equals(tuckOrError)) { +// logQuery.setIsErrorFavorite(true); + TeacherOpenCourseQuestionLogWrongQuery wrongQuery = new TeacherOpenCourseQuestionLogWrongQuery(); + wrongQuery.setStudentId(studentId); + wrongQuery.setTeacherOpenCourseQuestionLogStatus(1); + wrongQuery.setTeacherOpenCourseQuestionSettingId(questionSettingId); + List list = teacherOpenCourseQuestionLogWrongService.getValuesByQuery(wrongQuery); - if (ObjectUtil.isNotEmpty(list)) { - return BeanUtil.copyToList(list, ResourcesQuestionSnapshot.class); + if (ObjectUtil.isNotEmpty(list)) { + return BeanUtil.copyToList(list, ResourcesQuestionSnapshot.class); + } } return Collections.emptyList(); diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md index 408ac9a6..38e99e5c 100644 --- a/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseQuestionLog.md @@ -760,7 +760,7 @@ getValuesByQueryNotWithPermission left join student ta on ta.student_id = t.student_id and ta.student_status = 1 left join school_class tb on tb.class_id = ta.class_id and tb.class_status = 1 @ // 如果关联类型不为空,则关联题目配置表 - @if(!isEmpty(questionLogAddType)){ + @if(!isEmpty(questionSettingType)){ inner join teacher_open_course_question_setting tc on tc.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id @} where 1=1 @@ -820,7 +820,7 @@ getValuesByQueryNotWithPermission and (t.is_error_favorite =#isErrorFavorite# or t.student_score != t.question_score) @} @if(!isEmpty(questionLogAddType)){ - and tc.teacher_open_course_question_setting_type =#questionLogAddType# + and t.question_log_add_type = #questionLogAddType# @} @if(!isEmpty(orgId)){ and t.org_id =#orgId# @@ -840,8 +840,8 @@ getValuesByQueryNotWithPermission @if(!isEmpty(schoolClassIdPlural)){ and find_in_set(ta.class_id, #schoolClassIdPlural#) @} - @if(!isEmpty(questionLogAddType)){ - and tc.teacher_open_course_question_setting_type = #questionSettingType# + @if(!isEmpty(questionSettingType)){ + and tc.teacher_open_course_question_setting_type =#questionSettingType# and tc.teacher_open_course_question_setting_status = 1 and tc.teacher_open_course_question_setting_push_status = 1 @}