MYSQL的批量删除使用的xml

如果参数是array数组

	<update id="deleteAll">
		delete from C_V
		WHERE UUID in
		<foreach item="item" index="index" collection="array" open="("
			separator="," close=")"> #{item}
		</foreach>
		<include refid="where_appCode"/>
	</update>


如果参数是对象属性

	<update id="deleteAll">
		delete from C_V
		WHERE UUID in
		<foreach item="item" index="index" collection="code" open="("
			separator="," close=")"> #{item}
		</foreach>
		<include refid="where_appCode"/>
	</update>

猜你喜欢

转载自www.cnblogs.com/null/p/11207614.html