In a rare retreat for Amazon.com Inc., the e-commerce giant plans to shut down its Chinese marketplace business in July as it shifts its focus to offering mainland consumers overseas products rather than goods from local sellers. For now, Amazon’s commitment to China remains strong and it will continue to invest in the country, according to a company spokeswoman. She said it has been shifting the focus of its online retail business in the country to cross-border sales, which cater both to Chinese merchants selling to consumers abroad and to Chinese customers looking for high-quality goods from around the world.