<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.organization.mapper.trigger.HrmResourceTriggerMapper">
    <update id="updateLeaders">
        update jcl_org_map
        <set>
            fleaderimg = #{fLeaderImg},
            fleadername = #{fLeaderName},
            fleaderjobid = #{fLeaderJobId},
            fleaderjob = #{fLeaderJob},
            fleaderlv = #{fLeaderLv},
            fleaderst = #{fLeaderSt},
        </set>
        where fleader = #{fLeader} AND fdatebegin &lt;= #{currentDate}
        AND fdateend &gt;= #{currentDate}
    </update>

    <select id="getHrmResource" resultType="weaver.hrm.passwordprotection.domain.HrmResource">
        select id, workcode, lastname, status, messagerurl, jobtitle
        from hrmresource
        where id = #{id}
    </select>

    <select id="getFidsByFleader" resultType="java.lang.Long">
        SELECT fid
        FROM jcl_org_map
        WHERE FLEADER = #{fLeader}
          AND FDATEBEGIN &lt;= #{currentDate}
          AND FDATEEND &gt;= #{currentDate}
    </select>
</mapper>