The impact of A lost Korean War on China depends on when, where and it was lost. There were two ways the UN and RoK could win it after Chinese intervention:
1) Instead of the Home-by-Christmas Offensive, the UN forces managed to pull back, reorganize, consolidate, and form a defensive line south of Chosin reservoir and Ch'ongch'on river after the Chinese forces disengaged following the First Phase Campaign. Subsequent Chinese offensives failed because of a much better prepared UN defense.
To lose the Korea War in this way would hurt Mao's prestige vis-a-vis communist leaders who cautioned against the war, such as Zhu De and Lin Biao, but it would not develope into a full-blown confidence crisis to the CCP.
2) The UN forces managed to cut off and round up the tired and over-extended Chinese 13th Army during the Fourth Battle of Seoul, and causes a total Chinese collapse. A defeat in such scale would shake the foundations of the new Chinese communist state.
In all circumstances, the fall of DPRK would mean that China has to garrison large amount of troops on Yalu and Tumen, facing off the U.S.. This would cost China huge amount of resources, derailing the First Five Year Plan, which might be a good thing, as the Success of the First Five Year Plan lead to the Second Five Year Plan, also known as the Great Leap Forward.
A constant military pressure from Korea, without an actual war, might mean that The CCP was never confident enough to make the switch to full Planned Economy, and the Hybrid economy during the first couple of years of PRC lasted longer. This, coupled with a less prestigious Mao, might make fate of TTL China much better.