China's commerce ministry says there were more than 1.2 million foreign-invested enterprises in the country by the end of last year, with actual use of foreign investment exceeding 20 trillion yuan.