其他分享
首页 > 其他分享> > mybatis 结果映射 collection oftype为string,integer等类型

mybatis 结果映射 collection oftype为string,integer等类型

作者:互联网

<resultMap id="videoMap" type="com.yao.ivideo.model.dataobject.VideoDO">
  <result column="diagnosis_id" property="diagnosisId"/>
  <collection   property="videoList" ofType="string">
    <result column="videoUrl"/>
  </collection>
</resultMap>
<select id="selectVideoByDid"  resultMap="videoMap">
  select
      diagnosis_id,url "videoUrl"
  from
       t_agora_video
  where diagnosis_id in
  <foreach collection="list" item="id" separator="," open="(" close=")">
    #{id}
  </foreach>
</select>

 

标签:videoUrl,oftype,url,collection,diagnosis,mybatis,id
来源: https://www.cnblogs.com/mjbenkyo/p/14606951.html