mybatis中foreach标签的使用

下面详细介绍以下foreach标签的几个参数:

foreach标签参数.png

<select id="getNewListByLabelID" resultMap="BaseResultMap" parameterType="arraylist">
	SELECT
	<include refid="Base_Column_List"/>
	FROM tb_problem        
	WHERE id IN
	<foreach collection="ids" index="index" item="id" separator="," close=")" open="(">
	    #{id}
	</foreach>
</select>