A compound represented by formula (I) or a pharmaceutically acceptable salt thereof, wherein, X 1 is selected from C(R 5 ) and N; X 2 is selected from C(R 6 ), N, O, and S; are each independently selected from a single bond and a double bond; L is selected from a single bond and -O-; R 1 is selected from -C(=O)NH 2 , CN, C 1-5 alkyl, C 1-5 heteroalkyl, phenyl, 5- to 6-membered heteroaryl, and 5- to 6-membered heterocycloalkyl; said C 1-5 alkyl, C 1-5 heteroalkyl, phenyl, 5-to 6-membered heteroaryl or 5- to 6-membered heterocycloalkyl is optionally substituted with 1, 2 or 3 R; R 2 is selected from H, halogen, CN, COOH, -C(=O)NH 2 , C 1-4 alkyl, and C 1-4 heteroalkyl; said C 1-4 alkyl or C 1-4 heteroalkyl is optionally substituted with 1, 2 or 3 R; R 3 and R 7 are each independently selected from H, halogen and C 1-4 alkyl; said C 1-4 alkyl is optionally substituted with 1, 2 or 3 R; R 4 is selected from H, phenyl, and 5- to 6-membered heteroaryl; R 5 is selected from H and halogen; R 6 is selected from H, halogen, C 1-4 alkyl, C 1-4 heteroalkyl, CN, and COOH; said C 1-4 alkyl or C 1-4 heteroalkyl is optionally substituted with 1, 2 or 3 R; R is selected from halogen, OH, CN, CH 3 , CH 3 CH 2 , CH 3 CH 2 CH 2 , CH(CH 3 ) 2 , OCH 3 , OCF 3 , CHF 2 , CH 2 F, and NH 2 ; and said C 1-4 heteroalkyl, C 1-5 heteroalkyl, 5- to 6-membered heterocycloalkyl and 5- to 6-membered heteroaryl each contain 1, 2 or 3 heteroatoms or heteroatom radicals independently selected from -NH-, -O-, -S-, N, -C(=O)O-, -C(=O)-, -C(=O)NH-, -C(=S)-, -S(=O)-, -S(=O) 2 -, - C(=NH)-, -S(=O) 2 NH-, -S(=O)NH-, and -NHC(=O)NH-; preferably, X 2 is selected from C(R 6 ) and N, and more preferably, X 2 is selected from C(H), C(Cl), C(CH 3 ), and N. X 1 is selected from C(R 5 ) and N; X 2 is selected from C(R 6 ), N, O, and S; are each independently selected from a single bond and a double bond; L is selected from a single bond and -O-; R 1 is selected from -C(=O)NH 2 , CN, C 1-5 alkyl, C 1-5 heteroalkyl, phenyl, 5- to 6-membered heteroaryl, and 5- to 6-membered heterocycloalkyl; said C 1-5 alkyl, C 1-5 heteroalkyl, phenyl, 5-to 6-membered heteroaryl or 5- to 6-membered heterocycloalkyl is optionally substituted with 1, 2 or 3 R; R 2 is selected from H, halogen, CN, COOH, -C(=O)NH 2 , C 1-4 alkyl, and C 1-4 heteroalkyl; said C 1-4 alkyl or C 1-4 heteroalkyl is optionally substituted with 1, 2 or 3 R; R 3 and R 7 are each independently selected from H, halogen and C 1-4 alkyl; said C 1-4 alkyl is optionally substituted with 1, 2 or 3 R; R 4 is selected from H, phenyl, and 5- to 6-membered heteroaryl; R 5 is selected from H and halogen; R 6 is selected from H, halogen, C 1-4 alkyl, C 1-4 heteroalkyl, CN, and COOH; said C 1-4 alkyl or C 1-4 heteroalkyl is optionally substituted with 1, 2 or 3 R; R is selected from halogen, OH, CN, CH 3 , CH 3 CH 2 , CH 3 CH 2 CH 2 , CH(CH 3 ) 2 , OCH 3 , OCF 3 , CHF 2 , CH 2 F, and NH 2 ; and said C 1-4 heteroalkyl, C 1-5 heteroalkyl, 5- to 6-membered heterocycloalkyl and 5- to 6-membered heteroaryl each contain 1, 2 or 3 heteroatoms or heteroatom radicals independently selected from -NH-, -O-, -S-, N, -C(=O)O-, -C(=O)-, -C(=O)NH-, -C(=S)-, -S(=O)-, -S(=O) 2 -, - C(=NH)-, -S(=O) 2 NH-, -S(=O)NH-, and -NHC(=O)NH-; preferably, X 2 is selected from C(R 6 ) and N, and more preferably, X 2 is selected from C(H), C(Cl), C(CH 3 ), and N. <EOS>