diff --git a/src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java index 27941e4..d265583 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ExperimentalClassMapper.java @@ -123,7 +123,7 @@ public interface ExperimentalClassMapper { * @param experimentalClassId * @return */ - @Select("select c.classId,c.className from experimental_class_student stu,student s,class " + + @Select("select c.classId,c.className from experimental_class_student stu,student s,class c " + "where stu.studentId=s.studentId and s.classId=c.classId and stu.experimentalClassId=#{experimentalClassId} GROUP BY c.classId") List getStudentClass(Integer experimentalClassId); diff --git a/src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java index c8bd2a8..1df991f 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java @@ -86,8 +86,8 @@ public interface ExperimentallearningMapper { * @param courseId * @return */ - @Select("SELECT id,experimentId,experimentalClassId,classId FROM assessment WHERE id in (SELECT id FROM assessment ass,hr_project_management pm WHERE assesmentState=1 AND ass.experimentId=pm.projectId AND ass.experimentId in " - + "(SELECT projectId FROM hr_project_management WHERE isdel=0 AND projectPermissions=1 AND systemId in (SELECT systemId FROM course WHERE courseId=#{courseId})))") + @Select("select id,experimentId,experimentalClassId,classId from assessment a left join hr_project_management pm on a.experimentId=pm.projectId left join hr_course_tc tc on pm.systemId=tc.systemId\n" + + "where a.assesmentState=1 AND pm.state=1 and pm.isdel=0 AND pm.projectPermissions=1 and a.courseId=tc.courseId and tc.courseId=#{courseId} GROUP BY tc.systemId") List queryAssesment(Integer courseId);