As a character, I liked Riker. I never understood why some people had the vitriol for him that they did. And Riker serving as First Officer for 7 years, is TOTALLY believable. Post-Generations is where the case can be made that he should have moved on, especially since he even stated he was hanging around, in part, to command Enterprise-D.
Then there was BoBW. He actually was promoted to Captain. Now I realize that having been the Captain of the Enterprise during the mission to both rescue Picard from the Borg, and essentially being in the chair while the Enterprise-D saved Earth pretty much guarantees Riker can choose whatever assignment he wants, but what kind of reward is it to just demote him back to commander, once Picard is back on his feet?
I had always thought that it was odd that they did that. I think Riker should have been captain in rank (but not of the Enterprise), and if he wanted to serve on the Enterprise still as first officer, they could have either invented a special position for him (sort of like how Scotty was Captain of Engineering, and even in real world, large ships like aircraft carriers often have multiple captains), or even promoted Picard to Commodore, Rear Admiral or even some sort of "field Admiral" so that he still outranked Riker. Heck, I always saw Picard as a De Facto Commodore, anyway, as he was the captain of the flagship of starfleet, and typically always took the lead, when he assembled a battle group of ships (IE redemption, First Contact), so it could have worked.