<?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.dao.CoreTDxInvoiceImgDao">


    <select id="getImgFile" resultType="com.dxhy.api.model.sign.TDxInvoiceImg" databaseId="mysql">
        select *
        from t_dx_invoice_img
        where scan_id = #{scanId} limit 1
    </select>

    <select id="getImgFile" resultType="com.dxhy.api.model.sign.TDxInvoiceImg" databaseId="oracle">
    select * from (
        select *
        from t_dx_invoice_img
        where scan_id = #{scanId}
     ) tmp where ROWNUM &lt;= 1
    </select>
</mapper>
