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

时间:2021-04-01 19:01:43   收藏:0   阅读:21
<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>

 

原文:https://www.cnblogs.com/mjbenkyo/p/14606951.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!