INSERT INTO lin_user_group(user_id, group_id) VALUES (#{relation.userId}, #{relation.groupId}) DELETE FROM lin_user_group WHERE user_id = #{user_id}