mysql将字段逗号分隔为list
select distinct
substring_index(substring_index(a.nurse_dept, ',', b.help_topic_id+1), ',', -1)
from his_nurse as a
join mysql.help_topic b on
b.help_topic_id < (length(a.nurse_dept) - length(replace(a.nurse_dept,',',''))+1)
SELECT * FROM his_doctor
where 1 = 1
and concat
(ifnull(pinyin_code,''),ifnull(doctor_name,''),ifnull(wubi_code,''))
like concat('%',#{keyWords},'%')
and FIND_IN_SET(#{deptId}, doctor_dept)