Mapper:
List<xxx> getAll(@Param("platformArray") String[] platformArray);
Sql:
select * from xx where
<if test="platformArray != null and platformArray.length > 0">
Platform IN
<foreach collection="platformArray" index="index" item="item"
open="(" separator="," close=")">
#{item}
</foreach>
</if>
实际拼出来的sql:
select * from xx where Platform IN ("a","b")