delete from sys_user_post where user_id=#{userId} delete from sys_user_post where user_id in #{userId} insert all into sys_user_post(user_id, post_id) values (#{item.userId},#{item.postId}) SELECT 1 FROM DUAL