The present application relates to the field of pharmaceutical chemistry and in particular to a pyrrolopyrimidine compound represented by general formula (I) a stereoisomer thereof or a pharmaceutically acceptable salt thereof. The present invention further relates to a method for preparing the pyrrolopyrimidine compound represented by general formula (I) pharmaceutical compositions and an application of the pyrrolopyrimidine compound in treating diseases mediated by Janus Kinase.