Yeah it's really uncomfortable. You're also kind of trapped because you have to suck it up and just go with it to avoid upsetting the customer but sometimes it get's to me and I get really awkward around them to show I'm not really happy with the comment.
It's just such a weird thing to say to someone busy working. Why exactly would I be smiling all the time unless I start helping a customer?
But yeah I've gotten it at random places too like bars, busses, etc. At least then I can ignore them without any consequences, heh.
It's pretty obnoxious. Like they are saying "do a better job at being part of the scenery of my life, be a better decoration" or something. It's even worse if the job is based on service; I can only imagine what people think waitstaff should put up with in return for crappy tips etc when they can't get away from the situation.
EDIT: Being called ma'am is not a problem imo