<?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.hr.repository.jpa.IpLogRepository">


    <select id="queryInterfaceCallHistory" >
        select
            ord.id,
            ord.acc_no accountNo,
            ord.interface_name,
            ord.manufacturer,
            ord.`status`,
            ord.callback_status,
            log.add_time
        from ip_log log
        left join ip_order ord on ord.id = log.oid
        where 1 =1 and ref_id = 0 and  ord.id =:id and ord.acc_no = :accountNo and  ord.interface_name like '%'||:interfaceName||'%'
        order by ord.id desc
    </select>
</mapper>