<?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.dxhy.core.job.dao.TDxhttpLogDkdjWspzDao">
    <select id="selectLastreqDate" resultType="java.lang.String" databaseId="mysql">
        SELECT DATE_FORMAT(req_date, "%Y%m%d%H%i%s")
        FROM t_dx_http_log_dkdjwspz
        where taxno = #{taxno}
          and type = #{type}
        order by req_date desc
            limit 1
    </select>

    <select id="selectLastreqDate"  resultType="java.lang.String" databaseId="oracle">
        select * from (
        SELECT TO_CHAR(req_date, 'yyyyMMddHH24miss')
        FROM t_dx_http_log_dkdjwspz
        where taxno = #{taxno}
          and type = #{type}
        order by req_date desc
         ) tmp where ROWNUM &lt;= 1
    </select>
</mapper>