SELECT
u.user_id,
u.dept_id,
u.nick_name,
u.user_name,
u.email,
u.avatar,
u.phonenumber,
u.PASSWORD,
u.sex,
u.STATUS,
u.del_flag,
u.login_ip,
u.login_date,
u.create_by,
u.create_time,
u.remark,
d.dept_name,
d.leader
FROM
sys_user u
LEFT JOIN sys_dept d ON u.dept_id = d.dept_id
WHERE
u.del_flag = '0'
AND (
u.dept_id = 100
OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET ( 107, ancestors ) )
)
中WHERE FIND_IN_SET ( 107, ancestors )的意义。