收藏练习,错题练习

beetlsql3-dev
Mlxa0324 2 years ago
parent 42fbedb5f3
commit 371f7b913e

@ -906,18 +906,32 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
TeacherOpenCourseQuestionLogQuery logQuery = new TeacherOpenCourseQuestionLogQuery();
// 收藏
if (TUCK_TEST.equals(tuckOrError)) {
logQuery.setIsTuck(true);
} else if(ERROR_TEST.equals(tuckOrError)) {
logQuery.setIsErrorFavorite(true);
logQuery.setStudentId(studentId);
logQuery.setTeacherOpenCourseQuestionLogStatusPlural("1,2");
logQuery.setTeacherOpenCourseQuestionSettingId(questionSettingId);
logQuery.setQuestionLogAddType(FINALLY_SUBMIT);
List<TeacherOpenCourseQuestionLog> list = teacherOpenCourseQuestionLogService.getValuesByQueryNotWithPermission(logQuery);
if (ObjectUtil.isNotEmpty(list)) {
return BeanUtil.copyToList(list, ResourcesQuestionSnapshot.class);
}
}
logQuery.setStudentId(studentId);
logQuery.setTeacherOpenCourseQuestionLogStatus(1);
logQuery.setTeacherOpenCourseQuestionSettingId(questionSettingId);
List<TeacherOpenCourseQuestionLog> 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<TeacherOpenCourseQuestionLogWrong> 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();

@ -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
@}

Loading…
Cancel
Save