<resultMap id="BaseResultMap_MeetingVo" type="com.***.entity.vo.MeetingVo" > <result column="id" property="id" jdbcType="INTEGER" /> <result column="meeting" property="meeting" jdbcType="INTEGER" /> <collection property="videoList" javaType="ArrayList" column="{name=meeting}" select="getVideoUrls"/> </resultMap>
注意参数,sql语句的参数是mybatis动态传进去的,不需要我们指明:
<select id="getVideoUrls" resultType="com.***.entity.Record">
SELECT id,url from t_record where name= #{name}
</select>