The present invention relates to a pyrimidine derivative, a method for preparing same and use thereof in medicine. In particular, the present invention relates to a pyrimidine derivative represented by general formula (I), a method for preparing same and a pharmaceutically acceptable salt thereof as well as use thereof as a therapeutic agent, in particular as a FGFR4 kinase inhibitor, definitions of each substituent in the general formula (I) being the same as those defined in the description.