Uncovering resource losses and gains in China's foreign trade