All of Dickens's novels have happy endings (with the arguable exception of "Great Expectations", perhaps).

I would disagree with the all happy endings statement. Or at least quite a few were very ambivalent. It was not a very happy ending for Stephen Blackpool and Rachael in Hard Times. Not a happy ending for Nancy, Fagin, or really anyone but the title character in Oliver Twist.

It's described in my link as the first detective novel, whether or not that's true.

Happy ending? Well, it's not ecstatically happy. But compared to A Tale of Two Cities, it ends quite nicely.

Classic? Hmm. It's old, and it's fairly famous, but I'm on the fence with calling it a classic. Wilkie Collins was more a master of plot than characterization. I liked it, but I didn't feel myself to have touched perfection.

Where The Moonstone shines, in terms of meeting purple_fishy's criteria, is in being far different from a Jane Austen book.