<?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.fjhx.account.mapper.account.AccountRequestFundsMapper">
    <select id="getPage" resultType="com.fjhx.account.entity.account.vo.AccountRequestFundsVo">
        select
            arf.id,
            arf.department_id,
            arf.corporation_id,
            arf.account_management_id,
            arf.payment_time,
            arf.payment_remarks,
            arf.currency,
            arf.status,
            arf.type,
            arf.total,
            arf.quantity,
            arf.payment_method,
            arf.name,
            arf.opening_bank,
            arf.account_opening,
            arf.interbank_number,
            arf.remarks,
            arf.create_user,
            arf.create_time,
            arf.update_user,
            arf.update_time,
            arf.write_off_status,
            arf.advance_id,
            arf.advance_amounts,
            ap.`status` accountPaymentStatus,
            am.alias accountManagementName
        from account_request_funds arf
                 left join account_payment ap on arf.id = ap.business_id
                 left join account_management am on arf.account_management_id = am.id
            ${ew.customSqlSegment}
    </select>

</mapper>
