Disclosed is an isoquinolinone compound as shown in formula (I) or a stereoisomer, pharmaceutically acceptable salt, solvate or crystal thereof, and a preparation thereof and a use thereof in the preparation of drugs for treating or preventing viral infectious diseases caused by the hepatitis B virus (HBV) and other viruses, in particular, a use thereof in drugs for HBV Surface antigen inhibitors and HBV DNA production inhibitors. The compound has a significant activity for inhibiting the hepatitis B surface antigen and hepatitis B DNA, and it is possible to significantly improve the probability of curing hepatitis B by administration of same in combination with nucleoside drugs or other drugs in the future, and same has good clinical application prospects.