|
@@ -209,18 +209,20 @@
|
|
|
left join sys_user su on su.id_ = ilrr.user_id_
|
|
|
left join organization o on o.id_ = su.organ_id_
|
|
|
left join student s on s.user_id_ = su.id_
|
|
|
- where ilrr.room_uid_ = #{query.roomUid}
|
|
|
- <if test="query.search != null and query.search != ''">
|
|
|
- and (su.id_ like concat('%',#{query.search},'%')
|
|
|
- or su.phone_ like concat('%',#{query.search},'%')
|
|
|
- or su.username_ like concat('%',#{query.search},'%'))
|
|
|
- </if>
|
|
|
- <if test="query.subjectId != null">
|
|
|
- and find_in_set(#{query.subjectId},s.subject_id_list_)
|
|
|
- </if>
|
|
|
- <if test="query.organId != null">
|
|
|
- and su.organ_id_ = #{query.organId}
|
|
|
- </if>
|
|
|
+ <where>
|
|
|
+ ilrr.room_uid_ = #{query.roomUid}
|
|
|
+ <if test="query.search != null and query.search != ''">
|
|
|
+ and (su.id_ like concat('%',#{query.search},'%')
|
|
|
+ or su.phone_ like concat('%',#{query.search},'%')
|
|
|
+ or su.username_ like concat('%',#{query.search},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="query.subjectId != null">
|
|
|
+ and find_in_set(#{query.subjectId},s.subject_id_list_)
|
|
|
+ </if>
|
|
|
+ <if test="query.organId != null">
|
|
|
+ and su.organ_id_ = #{query.organId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
<select id="querySchoolIds" resultType="string">
|