|
@@ -13,23 +13,22 @@
|
|
|
FROM user_binding_teacher b
|
|
|
LEFT JOIN sys_user su ON b.student_id_=su.id_
|
|
|
LEFT JOIN student s ON b.student_id_=s.user_id_
|
|
|
- <where>
|
|
|
- <if test="param.subjectId != null">
|
|
|
- find_in_set(#{param.subjectId},s.subject_id_)
|
|
|
- </if>
|
|
|
- <if test="param.teacherId !=null">
|
|
|
- AND b.teacher_id_ = #{param.teacherId}
|
|
|
- </if>
|
|
|
- <if test="param.userName !=null and param.userName !=''">
|
|
|
- AND su.username_ LIKE CONCAT('%', #{param.userName}, '%')
|
|
|
- </if>
|
|
|
- <if test="param.studentList !=null and param.studentList.size>0">
|
|
|
- AND su.id_ IN
|
|
|
- <foreach collection="param.studentList" item="item" open="(" separator="," close=")">
|
|
|
- #{item.userId}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ WHERE b.last_end_class_ IS NOT NULL
|
|
|
+ <if test="param.subjectId != null">
|
|
|
+ AND find_in_set(#{param.subjectId},s.subject_id_)
|
|
|
+ </if>
|
|
|
+ <if test="param.teacherId !=null">
|
|
|
+ AND b.teacher_id_ = #{param.teacherId}
|
|
|
+ </if>
|
|
|
+ <if test="param.userName !=null and param.userName !=''">
|
|
|
+ AND su.username_ LIKE CONCAT('%', #{param.userName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="param.studentList !=null and param.studentList.size>0">
|
|
|
+ AND su.id_ IN
|
|
|
+ <foreach collection="param.studentList" item="item" open="(" separator="," close=")">
|
|
|
+ #{item.userId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<!-- 表字段 -->
|