<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.pluss.platform.mapper.BankCodeSxfMapper">

    <select id="getBranchName" resultType="cn.pluss.platform.leshua.BankNameVO">
        SELECT cnaps_code unionpayCode , cnaps_name branchName
        FROM tb_pluss_bank_code_sxf
        <where>
            <if test="bankName != null and bankName != ''">
                AND cnaps_name like CONCAT(#{bankName}, "%")
            </if>
            <if test="areaCode != null and areaCode != ''">
                AND city_name like CONCAT(#{areaCode}, "%")
            </if>
            <if test="provinceCode != null and provinceCode != ''">
                AND province_name like CONCAT(#{provinceCode}, "%")
            </if>
            <if test="branchName!=null and branchName!=''">
                AND cnaps_name like CONCAT("%",#{branchName},"%")
            </if>
        </where>
    </select>
</mapper>