mybatis3 foreach 参数为数组

  <select id="findByIds" resultMap="dataFileMap">
  select * from datafile
  <where>
   fileId in
  <foreach item="it" index="ind" collection="array" open="(" separator="," close=")">
   #{it}
  </foreach>
  </where>
 </select>

@Repository
public interface DataFileMapper {
 
 public List<DataFile> findByIds(String[] ids);

}

猜你喜欢

转载自zw7534313.iteye.com/blog/2223398
今日推荐