Disclosed is a compound of formula I, or a pharmaceutically acceptable salt, solvate, polymorph, enantiomer or racemic mixture thereof, wherein R1 and R2 are each independently hydrogen, —OH, alkyl, —CF3, —OCHF2, —OCF3 or halogen; R3 is cycloalkyl, —OCH2CF3, —OCH2CHF2, —OCH2CH2F or —OCH2CH3; R4 is hydrogen, —OH, —O aryl, —OCH2 aryl, alkyl, cycloalkyl, —CF3, —OCHF2, —OCF3, —OCH2CF3, —OCH2CHF2, —OCH2CH2F or halogen; A is —CX1X2, wherein X1 and X2 are each independently H, F and Cl, and when both X1 and X2 are H, R3 is not —OCH2CH3. The compound has an activity of inhibitors of sodium-dependent glucose transport protein. Also disclosed is a method for preparing the compound, a pharmaceutical composition comprising the compound, use of the compound and pharmaceutical composition thereof in preparing medicaments of SGLT2 inhibitors and treating related diseases.