in查询传参_foreach循环
1. ---Mapper.java
Type MethodName(@Param("param") List<String> param);
## 传参List类型
2. ---Mapper.xml
<select id="" parameterType="java.lang.String">
select t.id from table t
where t.name in
<foreach item="param" index="index" collection="param" open="(" separator="," close=")">
#{skuIds,jdbcType=VARCHAR}
</foreach>
</select>
## collection:List内容
3. ---.java
List<String> list = new ArrayList<String>();
list.add("");
MethodName(list);
原文链接:https://blog.csdn.net/yongpole/article/details/81661211