uncomfortably close physical inspections entering Shanghai metro

this year I spent 10 days in Shanghai for a conference, and did a lot of touristy wandering around through the city mostly on my own. Several times I was directed to go to the alternate turnstile they have at the Metro, or at least some of the ones I went to, where there's a guard or some sort of official who waved me through after a pause.

However on two of these stops the Metro official literally groped me - once was just a kind of a backhanded pat/swipe and the other time it was several deliberate presses in different spots, not unlike getting a health physical. I should add that I'm a guy, dressed casually in unremarkable track pants and/or jeans, and by my looks would definitely not be mistaken for a local.

Is this business as usual on the Shanghai metro or just something that happens to foreigners?