<resultMap >
  <result column="id" property="id"/>
  <collection   property="list" ofType="string">
    <result column="name"/>
  </collection>
</resultMap>
<select >
  select
      id,name
  from
       t_table
  where id in
  <foreach collection="list" item="id" separator="," open="(" close=")">
    #{id}
  </foreach>
</select>

 

相关文章: