From 14c5d06bf700de9cad32459735fcdd81a4717c9c Mon Sep 17 00:00:00 2001 From: pd <2776455882@qq.com> Date: Mon, 27 Jul 2020 15:48:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9E=E9=AA=8C=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E4=BA=8C=E7=BA=A7=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yipin/liuwanr/entity/ExperimentalClass.java | 14 +++++++++++++- .../com/yipin/liuwanr/mapper/AssesmentMapper.java | 3 +-- .../com/yipin/liuwanr/mapper/StudentMapper.java | 4 ++++ 3 files changed, 18 insertions(+), 3 deletions(-) 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({ " " })