java110
2023-05-25 781c2e20a4bb844dae3f4eafbf5f0e494b942ea8
java110-db/src/main/resources/mapper/user/OrgStaffRelServiceDaoImplMapper.xml
@@ -195,4 +195,24 @@
        </if>
    </select>
    <!-- 根据员工ID查询部门,公司信息 add by zc 2022-08-27 -->
    <select id="queryOrgInfoByStaffIdNew" parameterType="Map" resultType="Map">
        select
        t.rel_id relId,t.org_id departmentId,t.staff_id staffId,t.store_id storeId,u.org_name departmentName,
        u.org_id orgId,u.parent_org_id parentOrgId,u.org_level orgLevel
        from
        u_org_staff_rel t
        inner join u_org u on t.org_id = u.org_id
        WHERE 1 = 1 AND t.status_cd=0
        <if test="staffIds !=null">
            and t.staff_id in
            <foreach collection="staffIds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="staffId !=null and staffId !=''">
            and t.staff_id =#{staffId}
        </if>
    </select>
</mapper>