Provided in the present invention are a compound having the effects of preventing and treating diseases related to IDH mutation, and a preparation method and use thereof. In particular, provided in the present invention are the compound as shown in formula (I), a stereisomer, a racemic body or a pharmaceutically acceptable salt thereof, and the use thereof in preparing drugs for preventing and treating diseases related to IDH mutation.