<?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="jnpf.personnels.mapper.FtbPersonnelsAuditRunTaskHistoryMapper">

    <select id="queryHistoryInfo" resultType="jnpf.model.personnels.po.FtbPersonnelsAuditRunTaskHistory">
        SELECT
            his.F_Id AS id,
            his.F_BusinessId as businessId,
            his.F_MasterAuditConfigId as masterAuditConfigId,
            his.F_ExcuseStatus as excuseStatus,
            his.F_CreatorTime as creatorTime
        FROM
            ftb_personnels_audit_run_task_history AS his
                INNER JOIN ftb_personnels_audit_master_config AS mas ON his.F_MasterAuditConfigId = mas.F_Id
        WHERE
            his.F_BusinessId = #{id}
          AND mas.F_ConfigType = #{type}
        order by his.F_CreatorTime desc
    </select>
</mapper>