MYSQL之批量删除(mybatis)

如果参数是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>

 

posted @ 2019-07-18 15:26  不良徐某  阅读(1368)  评论(0编辑  收藏  举报