<?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.IBankCusbankextendconfigMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.muchinfo.mtp3pojos.entity.BankCusbankextendconfig">
        <id column="CUSBANKID" property="cusbankid" />
        <result column="EXTENDBIZTYPE" property="extendbiztype" />
        <result column="FIELDID" property="fieldid" />
        <result column="ISMANDATORY" property="ismandatory" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        CUSBANKID, EXTENDBIZTYPE, FIELDID, ISMANDATORY
    </sql>
    <select id="queryExtendset" resultType="com.muchinfo.mtp3pojos.entity.BankCusbankextendconfig"
            parameterType="java.lang.String">
        select
            wm_concat(to_char(b.fieldname)) as fieldnames,
            t.extendbiztype
        from BANK_CUSBANKEXTENDCONFIG t
                 left join Bank_ExtendField b on
            b.fieldid = t.fieldid
        where
            t.cusbankid = #{cusbankid}
        group by
            t.extendbiztype
    </select>

</mapper>
