zss
2024-08-01 30a143f368dd2ff6e9c27b9d5dd17923ffed03ae
user-server/src/main/resources/mapper/UserMapper.xml
@@ -6,7 +6,7 @@
        select u1.id, u1.account, u1.name, u1.state, u1.create_time, u1.update_time, u1.create_user, u1.update_user,
        u1.age, u1.email, u1.phone, u1.department, u1.company, u1.address, u1.is_custom, u1.role_id, u2.name
        create_user_name, u3.name update_user_name, r.name role_name,u1.signature_url,u1.picture_url,u1.depart_id,
        u1.name_en
        u1.name_en,u1.depart_lims_id
        from user u1
        left join user u2 on u2.id = u1.create_user
        left join user u3 on u3.id = u1.update_user
@@ -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>