Java语法:
private String[] tagIds;
MyBatis语法
<delete id="deleteByIds" parameterType="java.util.List" > delete from BIZ_USER_TAG_REL where ID in <foreach item="item" index="index" collection="list" open="(" separator="," close=")"> #{item} </foreach> </delete> <delete id="deleteByUserIdAndTagIds" parameterType="com.yuanchuangyun.framework.entity.system.UserTagRel" > delete from BIZ_USER_TAG_REL where USER_ID = #{userId} AND TAG_ID in <foreach item="item" index="index" collection="tagIds" open="(" separator="," close=")"> #{item} </foreach> </delete>