<?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.muchinfo.mtp3interface.mapper.IBankCusbanksignbankMapper">


    <select id="queryBankSignList" resultType="com.muchinfo.mtp3pojos.entity.BankCusbanksignbank"
            parameterType="java.lang.String">
        select
            t.cusbankid,t.bankid,b.bankname
        from BANK_CUSBANKSIGNBANK t
                 left join BANK_BANKINFO b on t.bankid = b.bankid
        where t.cusbankid = #{cusbankid}
        order by b.orderindex asc
    </select>

    <select id="queryBankInfoNotExist" resultType="com.muchinfo.mtp3pojos.entity.BankBankinfo"
            parameterType="java.lang.String">
        select t.bankid,t.bankname
        from bank_bankinfo t
        <where>
            <if test="searchcode != null and searchcode  !=''">
                t.bankname like '%'||#{searchcode,jdbcType=VARCHAR}||'%'
            </if>
            <if test="pageSize != null and pageSize != 0">
                AND rownum &lt;=#{pageSize}
            </if>
            and t.bankid not in
            (select b.bankid from BANK_CUSBANKSIGNBANK b where b.cusbankid =
            #{cusbankid})
        </where>
    </select>
</mapper>
