Please check out the trademark on the glasses. If they are real , the trademark is usually hard to break. Otherwise, it is fake. The designer sunglasses made in China are usually are Bolon, Vegoos, and so on.
Check the logo on the side of the sunglasses you bought online. If they are real Dolce & Gabbana sunglasses, there will be no spaces between the words in the logo. So if the logo is "Dolce&Gabbana" or "D&G.", then your sunglasses are real Dolce & Gabbana sunglasses. If there are spaces between the words, the sunglasses you bought online are probably fake. The D&G brand can be made in both Italy and China because they have manufacteres in china.