Yes, you can turn off notifications for junk mail on both Mac and iPhone. On your Mac, go to Mail > Settings > Junk Mail and adjust the settings, while on your iPhone, go to Settings > Notifications > Mail and customize the notification settings for the Junk Mail folder. The same goes for iPad.