The judge’s ruling bars former President Donald Trump from conducting business in New York for three years. Trump has vowed to appeal.