I don't know chink history but I'm just gonna assume the autocrats didn't have tthe same anti war problems america had over that war. Their problem was probably different.
I assume your talking about the 1979 Sino-Viet war but, China has invaded Vietnam multiple times.
After the Mongols successfully conquered China in the 1200s, they continued to try to expand their influence. In the first war, the Mongols used their chinamen slave hordes to conquer Vietnam. The Mongols halted once they captured the capital of Thang Long (lol) but the Vietnamese kingdom sort of just moved south and kept resisting.
During the second war, the Mongols used their chinamen slave hordes to invade and conquer the rest of Vietnam. This time, South Vietnam, known as Champa at the time, joined in the war. Despite initial success, the chinamen slave hordes were defeated in a major battle and the Mongols withdrew their slave hordes.
During the third war, the Mongols used their chinamen slave hordes to invade and conquer the rest of Vietnam. Despite initial success, the chinamen slave hordes were defeated in a major battle and the Mongols withdrew their slave hordes.
During the fourth war, the Mongols used their chinamen slave hordes to invade and conquer the rest of Vietnam. Despite initial success, the chinamen slave hordes were defeated in a major battle and the Mongols withdrew their slave hordes.
After the forth war, the Vietnamese offered to become a tributary state so they would stop getting invaded by the Mongols chinamen slave hordes and the Mongols agreed. The cooperation between Dai Viet (North Vietnam) and Champa (South Vietnam) is considered to be the foundational moment of the country of Vietnam and why they were pissed that Vietnam got split in two during the Vietnam war era.
As for the 1979 Sino-Viet war, the chinamen were pissed that Vietnam signed an alliance treaty with the Soviets and then invaded the chinamen puppet state Cambodia. Which at that point was ruled by Pol Pot, who was at the tail end of killing 1/3 of his population under his Year Zero policy. Worried about being invaded by the Soviets in response, they had deploy most of the PLA along the northern Soviet border.
I wish I had read something about this conflict but according the the Hoover Institute:
"the large-scale war with Vietnam also exposed the PLA’s humiliating ineptitude and shocking backwardness in comparison with the battle-hardened Vietnamese troops. Many PLA commanders did not know how to read military maps; despite superior artillery firepower and strike capability, the PLA high commanders inexplicably preferred close hand-to-hand combat, which was Vietnam’s outstanding strength, sending many PLA soldiers to brutal and unnecessary deaths. In addition, throughout the war, the PLA’s combat communications turned out to be highly ineffective."
This was during the Carter Administration, which completely backed China and agreed that if the Soviet Union got involved the USA would get involved on the side of China. It was also why this was a "Limited War" and didn't include the use of air or naval units. This war started a series of repeated conflicts that lasted until 1991, when China and Vietnam finally signed a peace treaty. After the Soviet Union fell.