<?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.utic.center.utic.traf.server.dao.mapper.dwdb.DwdbLinkPatternMapper">

    <select id="findLinkPattern15Min" resultType="com.utic.center.utic.traf.server.dto.LinkPtrnVal" parameterType="java.lang.String" fetchSize="2000">
        <![CDATA[
        SELECT a.LINKID AS linkId,
               a.SPEED  AS speed
        FROM ${tableName} a, LINK b
        WHERE b.LINKLEVEL = #{linkLevel}
          AND a.LINKID    = b.LINKID
          AND a.PATN_TIME = #{ptrnTime}
          AND a.SPEED IS NOT NULL
          AND a.SPEED BETWEEN 1 AND 149
          AND a.LOG_DATE IS NOT NULL
          AND a.LOG_DATE > TO_DATE(#{logDate}, 'YYYYMMDDHH24MISS')
        ]]>
    </select>

</mapper>
