<?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.sale.mapper.claim.ClaimContractMapper">
    <select id="getPage" resultType="com.fjhx.sale.entity.claim.vo.ClaimContractVo">
        select cc.id,
               cc.contract_id,
               cc.money,
               cc.contract_code,
               cc.create_user,
               cc.create_time,
               cc.update_user,
               cc.update_time
        from claim_contract cc
            ${ew.customSqlSegment}
    </select>

    <select id="getListByContractIds" resultType="com.fjhx.sale.entity.claim.po.ClaimContract">
        SELECT t1.*,
               t2.business_id,
               ard.rate
        FROM claim_contract t1
                 LEFT JOIN claim t2 ON t1.claim_id = t2.id
                 LEFT JOIN bytesailing_account.account_running_water ard ON t2.business_id = ard.id
            ${ew.customSqlSegment}
    </select>
</mapper>
