<?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.yeejoin.amos.boot.module.hygf.api.mapper.FinancingRectificationOrderMapper">

    <select id="selectDataList"
            resultType="com.yeejoin.amos.boot.module.hygf.api.dto.FinancingRectificationOrderDto">
        select
            hfro.sequence_nbr,
            hfro.peasant_household_id,
            hfro.rectification_status,
            hfro.peasant_household_name,
            hph.peasant_household_no,
            project_address_name   as projectAddress
        from
            hygf_financing_rectification_order  hfro
        INNER JOIN
            hygf_peasant_household hph on hph.sequence_nbr =  hfro.peasant_household_id
        <where>
            <if test="peasantHouseholdId != null and peasantHouseholdId != ''">
                hfro.peasant_household_id = #{peasantHouseholdId}
            </if>
        </where>


    </select>
</mapper>
