This paper studies the optimal investment strategy for a defined contribution pension plan with multiple risks under the mean-variance criterion. In the pension accumulation stage, the level of interest rate, volatility level and wage level are considered to be random, in addition, it is assumed that the term structure of interest rate is driven by the stochastic affine interest rate model, and the stock price is modeled by Heston's stochastic volatility model. By using the principle of stochastic dynamic programming and Lagrangian duality theorem we obtain the explicit solutions for the efficient strategy and the efficient frontier. A numerical example is given to analyze the effects of interest rate parameters, volatility parameters, and salary parameters on efficient strategies and efficient frontiers. Research results show that the capital market line with interest rate risk, volatility risk and salary risk environments is still a straight line in a mean-standard deviation plane. That is to say, the efficient strategy only depends on both instantaneous interest rate level and instantaneous salary level, while the efficient frontier does not depend on the interest rate level, volatility level and salary level.