user-server/src/main/resources/mapper/UserMapper.xml
@@ -39,4 +39,12 @@ from user where state = 1 </select> <select id="getCustom" resultType="com.yuanchu.mom.pojo.User"> select u.id,c.company,u.name,c.code,u.phone,c.id departId from user u left join custom c on u.company = c.id where u.id = #{userId} </select> <select id="getUser" resultType="com.yuanchu.mom.pojo.User"> select * from user where depart_lims_id=FIND_IN_SET(depart_lims_id, (select GROUP_CONCAT(id SEPARATOR ',') from department_lims where department_lims.name like '%实验室')) </select> </mapper>