Weak domestic demand weighs on the world’s second-largest economy even as energy crisis drives up costs