Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/cooleshow

liujunchi 3 years ago
parent
commit
4238138d20

+ 16 - 17
cooleshow-user/user-biz/src/main/resources/config/mybatis/UserBindingTeacherMapper.xml

@@ -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>
 
     <!-- 表字段 -->