Explorar el Código

feat: 教务端学生签到记录查询

Joburgess hace 4 años
padre
commit
fc1c0fb710

+ 11 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentAttendance.java

@@ -39,6 +39,8 @@ public class StudentAttendance {
 	@ApiModelProperty(value = "学生姓名",required = false)
 	private String username;
 
+	private String avatar;
+
 	/**  */
 	@ApiModelProperty(value = "声部列表",required = false)
 	private String subjectName;
@@ -133,7 +135,15 @@ public class StudentAttendance {
 	public Long getId(){
 		return this.id;
 	}
-			
+
+	public String getAvatar() {
+		return avatar;
+	}
+
+	public void setAvatar(String avatar) {
+		this.avatar = avatar;
+	}
+
 	public GroupType getGroupType() {
 		return groupType;
 	}

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml

@@ -14,6 +14,7 @@
         <result column="course_schedule_id_" property="courseScheduleId"/>
         <result column="user_id_" property="userId"/>
         <result column="username_" property="username"/>
+        <result column="avatar_" property="avatar"/>
         <result column="subject_name_" property="subjectName"/>
         <result column="phone_" property="phone"/>
         <result column="teacher_id_" property="teacherId"/>
@@ -470,7 +471,7 @@
             GROUP BY sa.course_schedule_id_
     </select>
     <select id="findStudentAttendance" resultMap="StudentAttendance">
-        SELECT sa.*,su.username_,su.phone_,IF(s.name_ IS NULL,s1.name_,s.name_) subject_name_
+        SELECT sa.*,su.username_,su.phone_,IF(s.name_ IS NULL,s1.name_,s.name_) subject_name_,su.avatar_
         FROM course_schedule_student_payment cssp
         LEFT JOIN student_attendance sa ON cssp.course_schedule_id_ = sa.course_schedule_id_ AND cssp.user_id_ = sa.user_id_
         LEFT JOIN sys_user su ON cssp.user_id_ = su.id_

+ 29 - 0
mec-web/src/main/java/com/ym/mec/web/controller/education/EduStudentStudentController.java

@@ -0,0 +1,29 @@
+package com.ym.mec.web.controller.education;
+
+import com.ym.mec.biz.service.StudentAttendanceService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Author Joburgess
+ * @Date 2020.09.14
+ */
+@RestController
+@RequestMapping("eduStudentAttendance")
+public class EduStudentStudentController extends BaseController {
+
+    @Autowired
+    private StudentAttendanceService studentAttendanceService;
+
+    @ApiOperation(value = "获取某节课学生签到列表")
+    @GetMapping("/findStudentAttendance")
+    public Object findStudentAttendance(QueryInfo queryInfo){
+        return succeed(studentAttendanceService.findStudentAttendance(queryInfo));
+    }
+
+}