例如 [select * from tableName where id In(1,2,3,4)]
<select id="findListById" resultType="Goods">
SELECT * FROM TABLE_NAME WHERE g.id IN
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="findListById" resultType="Goods">
SELECT * FROM TABLE_NAME WHERE g.id IN
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>