It would seem that hooker with a heart of gold stories are not the sole creation of 20th century Hollywood. The Oil Peddler, or in full, "The Oil Peddler who Courts the Courtesan" is a story collected by Feng Meng-lung in his collection Hsing-shih heng-yen(Lasting Word to Awaken the World). This work was first published in 1627, although the story could have been written much eariler, and the story takes place during the Jurchen conquest of the Northern Song, during the middle part of the 12th century.
The Jurchen conquest of the North is the beginning element of the story, as it describes how refugees fleeing to Southern China get their lives disrupted, and then, with some hard work and good fortune they manage to put their lives back together, and end up happy again.
The main characters in this story are Ch'in Ch'ung, the title oil peddler, and Wang Mei-niang, the title courtesan. Although they both do not know it, both were refugees from the same northern village that got overrun by Tartars. They come to the big citym where, things being what they are, the man becomes a menial laborer, and the woman becomes a prostitute. Although as in much Chinese literature, the work does not portray prostitution as being especially shameful; it does have a rather graphic description of Mei-Niang losing her virginity by being raped while drunk. Over all, however, Mei-Niang's job as a courtesan seems to consist mostly of playing chess and writing poetry with wealthy beaurocrats. Be that as it may, she is still very unhappy with being a prostitute.
Ch'in Ch'ung sees Mei Niang out of the corner of his eye while delivering oil to the house where she works. He becomes infatuated with her, and hatches a plan to spend a night with her, even though spending a night with such a high priced courtesan will take him saving up several years worth of salary.
However, after a long time, he is able to save the money, and despite the madam's intitial amazement, is ushered into her room. However, there is a problem. Mei-niang has been out with some of her clients, and pissed off at male selfishness and piggishness, has been getting really drunk. She shows up late, and comes into her room not exactly in the mood to spend some time with another man. She merely falls down on her bed, puking drunk. Ch'in Ch'ung, however, is more then happy enough to have the chance to take care of the beautiful yet sick courtesan. When she has to throw up, he doesn't want her to get her bed sheets dirty, so he takes off his coat and lets her throw up into that. He also keeps a pot of tea warm by holding it against his body, so that when she wakes up in the middle of the night, she will havw warm to drink. This entire scene is told rather truthfully and tenderly.
Wang Mei-niang realizes that this is the type of man that she really likes, and after a few more misadventures proving to her how evil men are, she manages to run out of the brothel with her saved up money, find the oil peddler and get married. As an added bonus, she is reunited with her parents and he finds his father, and they retire as wealthy oil merchants.
This story could be discounted as just a "man chases unattainable woman and finally gets her" fairy tale, but most of the details of the story seem rather authentic, of not true, such as Mei-niang's mixture of cynicism about the people around her and her desire to go back to being a girl again. And, the story does teach a very good moral: if you want to attract a girl, don't try to be a millionaire playboy. Just very sincerely pay attention to someone's needs, and they will like you.