Look at Russia as an example. The war has been longer and less popular than expected and economic sanctions have hurt the working class the most.
China imports 66%-75% of its oil. That would drop dramatically in a hot war, as oil imports via the South China Sea would likely be blocked. This would require any imports to sail around Australia, which would likely be stopped by the US.
Russia would happily sell China oil, but it doesn't produce nearly enough to cover the gap.
No oil, no military. No oil, no economy.