Why does the detention center want you to take a statement? It's the police station
And you can't visit friends when you go to the detention center, which is not allowed by law.
In a similar situation, you should inform your friend's family first, and don't let his family worry.
We can ask his family to hire a criminal lawyer as soon as possible and see if they can get bail pending trial.
I'm not from Shanghai, but I can introduce you to a professional criminal lawyer in Shanghai with good reputation and high customer satisfaction.
The official website should be: www.law38.com, you can ask.