What is the meaning of [Do as you would be done by]

Treat others as you would like them to treat you. If you don’t, you may be
punished, as Tom was in _The Water Babies_ , by that fearsome lady, Mrs
Bedonebyasyoudid.

This important proverb is regarded by many moralisers as the essence of good
behaviour. The world would be near-perfect if the advice were universally
followed.