Registering a domain name secures a right to use it for a fixed period under the registration agreement; it creates no trademark rights at all. The exclusive right to a trademark can be obtained only by applying to CNIPA and having the mark approved for registration, and a foreign applicant must file through a trademark agency lawfully established in China. The two systems differ completely in the authority that administers them, the standards applied, and the boundaries of the resulting right. Domain registration generally operates first-come, first-served, with no examination of prior rights; trademark registration goes through both formality and substantive examination.
That creates risk in both directions. First, having registered a domain first is not in itself a basis for using the sign: where the distinctive part of the domain is identical or similar to someone else's earlier registered trademark, and the domain is used in a business dealing in the same or similar goods or services, it can still amount to trademark infringement or unfair competition. Second, where someone else has squatted a domain, whether it can be recovered depends largely on whether you hold an earlier trademark right.
The right order, then, is to run the trademark search and put the trademark filings in place first, and to settle the domain names second.