The present invention falls within the technical field of medicine, and in particular relates to PDE9 inhibitor compounds as shown in formula (I) or pharmaceutically acceptable salts or stereoisomers thereof, and also relates to pharmaceutical preparations and pharmaceutical compositions of the compounds and the uses thereof. X<;sub>;1<;/sub>;, X<;sub>;2<;/sub>;, X<;sub>;3<;/sub>;, X<;sub>;4<;/sub>;, R<;sub>;1<;/sub>;, R<;sub>;2<;/sub>;, ring A, L and m are as defined in the description. The compounds can be used to prepare drugs for treating or preventing related diseases mediated by PDE9.