zss
2025-02-19 8a9eb937345d499a90e69df764d9dac677ede35f
ruoyi-system/src/main/resources/mapper/system/UserMapper.xml
@@ -29,4 +29,22 @@
            ${ew.customSqlSegment}
        </if>
    </select>
    <!-- 获取用户部门 -->
    <select id="selectUserDepartmentLimsName" resultType="java.lang.String">
        select dl.name
        from user u
                 left join department_lims dl on find_in_set(dl.id, u.depart_lims_id) and dl.id != 1
        where u.id = #{userId}
        limit 1
    </select>
    <!-- 查询用户和部门 -->
    <select id="selectNameAnddepartment" resultType="java.util.Map">
        select u.name  userName,
               dl.name department
        from user u
                 left join department_lims dl on find_in_set(dl.id, u.depart_lims_id) and dl.id != 1
        where find_in_set(u.id, #{participant})
    </select>
</mapper>