传递多个参数时:

 <resultMap id="BillStandardHighRuleResult" type="org.jeecg.areatable.entity.ArtbFeeHighRule">
        <result property="id" column="id"/>
        <result property="standardId" column="standard_id"/>
        <result property="archive" column="archive"/>
        <collection property="highList" column="{id= id,standardId= standard_id}" select="getChildById"/>
    </resultMap>

   <select id="getChildById" resultType="xxxx">
        SELECT
        a.id,
        a.standard_id,
        a.bbb,
        ac,
        a.standard_id 
        FROM
            `aaaa` a
        WHERE
            a.id= #{id}
            a.standard_id = #{standardId}
            and a.del_flag = '0'
    </select>
 多参数时在column中用"{}"将参数包起来, =左边的为是mapper中定义的param的属性, =右边的是主查询中的表字段名  

传递一个参数时:column中对用的字段是数据库中的字段

 <collection property="childList" column="id" select="getChildList"/>

描述有误的地方欢迎大家指正,大家有问题可加qq,876942434。一起进步~

更多推荐

mybatis.xml中collection多参数传递