Don't panic, thats what author Elisabet Parra discovered was the situation back in the Spanish Civil War when Franco's troops entered Barcelona.
She says in her new book, El Barcelona Calenta, that the perception was that Franco's right wing policies, many closely tied in with the Catholic church, would see prostitution banned and imprisonment for the girls. Many ran away to France with the exodus of Republicans, presumably to continue their trade over there.
She also notes that there were an awful lot of rapes by Franco's facist conquerers when they took the city. Without reading the whole book I'm not sure if her observation implies that that's what conquering troops did in that war, if thats what Franco's troops did in populations they had no respect for or whether the lack of prostitutes as an outlet for sexual frustration elevated the occurrences. Either way rape is a sick crime without excuse, even against the population of your enemy.
Given the history of Barcelona as a major Mediterranean sea port with the traditional mariner related demand for prostitutes upon hitting terra-firma we could have found maybe the only time in history when the oldest trade wasn't practiced in Barcelona.