diff --git a/src/main/java/com/yipin/liuwanr/entity/ExperimentalClass.java b/src/main/java/com/yipin/liuwanr/entity/ExperimentalClass.java index 709ebe9..6cfa6b4 100644 --- a/src/main/java/com/yipin/liuwanr/entity/ExperimentalClass.java +++ b/src/main/java/com/yipin/liuwanr/entity/ExperimentalClass.java @@ -1,5 +1,7 @@ package com.yipin.liuwanr.entity; +import java.util.List; + /** * 实验班级信息 * @@ -30,7 +32,17 @@ public class ExperimentalClass { private Integer schoolId; //绑定用户Id private Integer userId; - + + private List students; + + public List getStudents() { + return students; + } + + public void setStudents(List students) { + this.students = students; + } + public Integer getUserId() { return userId; } diff --git a/src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java b/src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java index 07649db..d87ba56 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java @@ -200,13 +200,12 @@ public interface AssesmentMapper { @Results({ @Result(id = true, column = "experimentalClassId", property = "experimentalClassId"), @Result(column = "experimentalClassName", property = "experimentalClassName"), - @Result(column = "experimentalClassId", property = "students", many = @Many(select = "com.yipin.liuwanr.mapper.StudentMapper.queryStudent")) + @Result(column = "experimentalClassId", property = "students", many = @Many(select = "com.yipin.liuwanr.mapper.StudentMapper.getByStudents")) }) List queryExperimentalClass(@Param("creationTime") String creationTime, @Param("staffId") Integer staffId); /** * 考核名称、创建时间、结束时间、教师名称、考核人数、实到人数 - * * @param assesmentId * @return */ diff --git a/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java b/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java index 8b183c8..1533ef4 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java @@ -24,6 +24,10 @@ public interface StudentMapper { " and FIND_IN_SET(t.classId,#{classIds})", " " }) List queryStudent(Student student); + @Select("select s.studentId,studentName from experimental_class_student ecs left join student s on ecs.studentId=s.studentId where ecs.experimentalClassId=#{experimentalClassId} ") + List getByStudents(Integer experimentalClassId); + + @Update({ " " })