The present invention relates to a class of substituted triazolopiperazine compounds represented by general formula (I), tautomers, enantiomers, diastereomers, racemates, metabolites, metabolic precursors, and pharmaceutically acceptable salts, esters, prodrugs or hydrates thereof, a preparation method therefor, intermediates, and a use thereof in the preparation of drugs for the prevention and treatment of PARP-related disorders, wherein said PARP-related disorders comprise various ischemic diseases, neurodegenerative disorders and cancer.