I may be overly optimistic but I think a blanket ban on foreigners is too blunt a tool. China is not the only country that has banned or severely restricted foreigners, and certainly it seems to be an agreed approach to reduce the chance of a second wave.
The focus in the Chinese media on 'imported' case omits the fact that these are all Chinese nationals given that it's been 6 weeks with a ban on entrant, so the continued rhetoric in both medias may continue to drive up some difficult treatment of foreigners. One thing it is still tough to get used to is how quickly public opinion changes, and has changed over the last year with US-China trade war, HK, and now Covid. In the taxi to work today I listened to the retort to the US messages (can they explain about this, can they explain this) and I was actually surprised the driver didn't ask me why 'we' were accusing China given the evidence to the contrary.