Iran is not close to NK's importance to China. You might want to read up on how long it even took Iran to come around to China. If JCPOA didn't get terminated by Trump, the Iranians would still be waiting on the Europeans right now.Iran importance to china is like north Korea importance to china. Having conservative there is a must.
Turkey on the other hands is not that much important (Greece is far more important). It's not that bad if Erdogan loose but rather have Erdogan win is better for china as turkey is more isolated from both side.
China should make turkey weak weather Erdogan win or not. Erdogan winning will make it easier for china.
Keep in mind that Turkish importance comes from being a country that you can move over the your column from NATO. Greece will never willingly leave NATO. Turkish GDP is 4x that of Greece, more than 2x that of iran and about same as Saudi Arabia. It has a huge army. It's a power in its own right.
How many potential Chinese allies do you think have Turkey's economy size? Let's see: Russia, Brazil, Indonesia & Saudi Arabia. That's it.