On a visit, someone's impression China reflects who you are more than it reflects China itself.
I am Chinese in all ways, born and raised. Even I know that if you associate with negative people, China will seem like the worst hellhole on earth (because your friends make it that way), and if you associate with positive people, China will be a happy place (again because of your friends). This is because China has many problems due to being a developing nation, so there's plenty of negatives to focus on, but also because there's so much to do in China and so many opportunities, and the culture is one of cooperation rather than brutal competition, and people are generally nice.
You are a foreigner, so your experience may be different, and you might be a businessman, so your travels will take you to places like Dongguan or Yiwu where there are higher crime rates, lowly educated natives who got rich fast due to government policy and more migrant workers with low educations. There's no colleges in those cities, so there's not many professionals working there.
This hasn't much to do with rich or poor. Some of my rich classmates are never happy, wasted their lives on the computer and always complaining, some of the poor classmates whose first visit to the city was to go to college are happy and motivated.