|
@@ -3,7 +3,7 @@
|
3
|
3
|
<mapper namespace="com.xhkjedu.suser.mapper.gradeclass.ClassStudentMapper">
|
4
|
4
|
<!--班级学生列表-->
|
5
|
5
|
<select id="findAll" resultType="com.xhkjedu.suser.vo.gradeclass.ClassStudentVo">
|
6
|
|
- select cs.csid,cs.classid,u.username studentname,u.studentno,u.usersex,u.userid studentid,u.loginname,cs.createtime
|
|
6
|
+ select cs.csid,cs.classid,c.classname,c.gradeid,u.username studentname,u.studentno,u.usersex,u.userid studentid,u.loginname,cs.createtime
|
7
|
7
|
,u.bindmac,u.mac,u.headpic,u.userphone,u.usertime
|
8
|
8
|
from t_class_student cs left join t_user u on cs.studentid = u.userid
|
9
|
9
|
left join t_class c on cs.classid=c.classid
|
|
@@ -117,4 +117,22 @@
|
117
|
117
|
LEFT JOIN t_school s ON c.schoolid=s.schoolid
|
118
|
118
|
WHERE cs.studentid=#{studentid} AND c.year=s.year AND c.classtype=2
|
119
|
119
|
</select>
|
|
120
|
+
|
|
121
|
+ <!--直播班中学生信息-->
|
|
122
|
+ <select id="listStudentForliveclass" resultType="com.xhkjedu.suser.vo.gradeclass.ClassStudentVo">
|
|
123
|
+ select cs.csid,cs.classid,u.username studentname,u.studentno,u.usersex,u.userid studentid,u.loginname,cs.createtime
|
|
124
|
+ ,u.bindmac,u.mac,u.headpic,u.userphone,u.usertime,
|
|
125
|
+ (select concat(c2.gradeid,'_',c2.classname) from t_class_student cs2 left join t_class c2 on cs2.classid=c2.classid
|
|
126
|
+ where cs2.studentid=cs.studentid and c2.classtype=1 and c2.classstate=1 and c2.year=#{student.year} order by c2.classid desc limit 1)classname
|
|
127
|
+ from t_class_student cs left join t_user u on cs.studentid = u.userid
|
|
128
|
+ left join t_class c on cs.classid=c.classid
|
|
129
|
+ where cs.classid=#{student.classid}
|
|
130
|
+ <if test="student.studentname!=null and student.studentname!=''">
|
|
131
|
+ and (u.username like '%${student.studentname}%' or u.studentno like '%${student.studentname}%'
|
|
132
|
+ or u.loginname like '%${student.studentname}%' or u.userphone like '%${student.studentname}%')
|
|
133
|
+ </if>
|
|
134
|
+ <if test="student.fieldname!=null and student.fieldname!=''">
|
|
135
|
+ order by ${student.fieldname} ${student.fieldorder},cs.csid desc
|
|
136
|
+ </if>
|
|
137
|
+ </select>
|
120
|
138
|
</mapper>
|