题目接口,学生身份过滤班级

beetlsql3-dev
maLix 2 years ago
parent 4db8977b4a
commit 665e4ae0f1

@ -594,6 +594,7 @@ public class ResourcesQuestionSnapshotService extends CoreBaseService<ResourcesQ
Assert.notNull(student, "该接口只允许学生访问");
PageQuery pageQuery = query.getPageQuery();
pageQuery.setPara("studentId", student.getStudentId());
pageQuery.setPara("classIds", student.getClassId().toString());
// 默认只查询普通最终提交
query.setQuestionLogAddType(defaultIfNull(query.getQuestionLogAddType(), FINALLY_SUBMIT));
PageQuery<TeacherOpenCourseQuestionTestSimpleInfoVO> questionTestSimpleInfo = resourcesQuestionSnapshotDao.getQuestionTestSimpleInfo(pageQuery);

@ -743,6 +743,9 @@ getQuestionTestSimpleInfo
AND t.teacher_open_course_question_setting_status = 1
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 ( 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
and tb.question_status = 1

Loading…
Cancel
Save