Long story short, China took our land and claimed for it but the main point is:
1- Deng Xiao Peng want to prove to China Adminsitration that China Army is very weak, and he was used Vietnam as a test for they modernized their Army.[China gov still hide this story to their people]
2- After Revolution Culture, economic of China is weak and getting over population, so Deng Xiao Peng will used Vietnam as a Killing Machine to killed 50.000 troops [not include wounded]
3- Deng Xiao Peng want to prove USSR will not intervene due to Vietnam - USSR ally, and try to forced Vietnam withdraw troop from Cambodia.
Yes Vietnam was Defeated China and gave what Deng wants that VN killed China troops for China due to over population, Deng has possitive point to prove China Gov for their modernized China Army. Vietnam was not withdraw troops in Cambodia.
No, Vietnam was Loose due to lost lives and badly damage during boder skirmish, lost some part of Vietnam land. Economic was weak and get more weaker due to US ambargo and sanction. US at that time still lost face and hates Vietnam Gov. Spent thousands of gallons to burn China troops cost alot of money. USSR did not intervene as a ally as it was.