I’m pretty sure that’s John Dryden, and not a Chinese aphorism. I learned it years ago when Tom Clancy quoted Dryden at the beginning of one of his novels. (I can’t remember which — but I think it was one of his revenge-minded tales like “Without Remorse” or “Debt of Honor.”) Strangely enough, Goodreads has the quote falsely attributed to Clancy himself.
But it works. Well done, Fortune Cookie People.
The other one I got advised me, “Do not build your happiness on others’ sorrow.” That sounds like good advice to me — and it’s a bit more high-minded than Dryden’s warning.