In fact, Barcelona can get a tax refund, provided that your luggage is checked directly to China, and Frankfurt does not pick up your luggage.
If you have to go to Germany for tax refund, there are two kinds: customs tax refund and customs tax refund, depending on whether you have any goods with you.
If it is checked baggage for tax refund, go through the check-in formalities first, inform that tax refund is needed, and take out the baggage. This is mainly for hanging luggage consignment labels. Then go to the customs to stamp. In the meantime, you can check your luggage to see if the goods are there. After that, your luggage will be automatically transported away (for the purpose of hanging the baggage consignment label) and your tax refund form will be stamped. Then there will be a global tax exemption nearby, which is actually an intermediary. You can choose to withdraw cash or punch in (card usually needs 1 month). There may be some goods that cannot be refunded and need to be returned to the store. If you stop traveling, you won't get your money back.
If it is a carry-on baggage tax refund, you need to go through the customs first, and then stamp it inside to withdraw money.