<?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.huyi.service.common.financeInf.mapper.FinanceInfMapper">

    <select id="selectFinanceInfList" parameterType="map" resultType="map">
        SELECT
        zfi_id 		        'zfiId',
        zfi_number 		    'zfiNumber',
        zfi_amount 		    'zfiAmount',
        DATE_FORMAT(zfi_expire_date,'%Y-%m-%d %H:%i:%s') AS 	'zfiExpireDate',
        zfi_product_id      'zfiProductId',
        zfpcr_rate 		    'zfpcrRate',
        zfpcr_loan_type 	'zfpcrLoantype'
        FROM
        zc_finance_inf
        LEFT JOIN zc_finance_pro_com_rel
        ON zfi_core_quota_id = zfpcr_id
        WHERE zfi_status = '02'
        <if test="paramMap.companyId != null  and paramMap.companyId != ''">
            AND zfi_supplier_id = #{paramMap.companyId}
        </if>
        order by zc_finance_inf.create_time desc
    </select>
</mapper>