修改实验班级二级标题

master
pd 4 years ago
parent 66c7b46621
commit 14c5d06bf7
  1. 12
      src/main/java/com/yipin/liuwanr/entity/ExperimentalClass.java
  2. 3
      src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java
  3. 4
      src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java

@ -1,5 +1,7 @@
package com.yipin.liuwanr.entity;
import java.util.List;
/**
* 实验班级信息
*
@ -31,6 +33,16 @@ public class ExperimentalClass {
//绑定用户Id
private Integer userId;
private List<Student> students;
public List<Student> getStudents() {
return students;
}
public void setStudents(List<Student> students) {
this.students = students;
}
public Integer getUserId() {
return userId;
}

@ -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<ExperimentalClass> queryExperimentalClass(@Param("creationTime") String creationTime, @Param("staffId") Integer staffId);
/**
* 考核名称创建时间结束时间教师名称考核人数实到人数
*
* @param assesmentId
* @return
*/

@ -24,6 +24,10 @@ public interface StudentMapper {
" <if test='classIds!=null'> and FIND_IN_SET(t.classId,#{classIds})</if>", "</script> " })
List<Student> 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<Student> getByStudents(Integer experimentalClassId);
@Update({ "<script>", "UPDATE student SET isdel = 1 where studentId in "
+ "<foreach collection = 'list' item='c' open='(' separator=',' close=')'>" + " #{c}" + "</foreach>",
"</script> " })

Loading…
Cancel
Save