|
@@ -372,6 +372,23 @@
|
|
|
#{userId}
|
|
|
</foreach>
|
|
|
</select>
|
|
|
+ <select id="queryUserNameByIdList" resultType="java.util.Map">
|
|
|
+ select id_ `key`,IF(username_ IS NUll,real_name_,username_) `value` FROM sys_user s WHERE id_ IN
|
|
|
+ <foreach collection="userIds" item="userId" separator="," open="(" close=")">
|
|
|
+ #{userId}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="querySubjectNameByIdList" resultType="java.util.Map">
|
|
|
+ select t.id_ `key`,GROUP_CONCAT(s.name_) `value`
|
|
|
+ FROM teacher t
|
|
|
+ LEFT JOIN subject s ON FIND_IN_SET(s.id_,t.subject_id_)
|
|
|
+ WHERE t.id_ IN
|
|
|
+ <foreach collection="userIds" item="userId" separator="," open="(" close=")">
|
|
|
+ #{userId}
|
|
|
+ </foreach>
|
|
|
+ GROUP BY t.id_
|
|
|
+ </select>
|
|
|
|
|
|
<select id="queryPhoneByIds" resultType="java.util.Map" parameterType="list">
|
|
|
select id_ `key`,phone_ `value` FROM sys_user s WHERE FIND_IN_SET(id_,#{userIds}) AND s.phone_ IS NOT NULL
|
|
@@ -1244,4 +1261,7 @@
|
|
|
SELECT GROUP_CONCAT(real_name_) FROM sys_user su
|
|
|
WHERE FIND_IN_SET(su.id_,#{teachingTeacherIds})
|
|
|
</select>
|
|
|
+ <select id="queryAllIds" resultType="java.lang.Integer">
|
|
|
+ SELECT id_ FROM sys_user
|
|
|
+ </select>
|
|
|
</mapper>
|