One always earns as if flying AA on AA marketed flights (“codeshares” sold as AA) regardless of the operating airline. If an AA agent or TA says anything to the contrary, Hang Up, Call Again.
Flying China Southern as China Southern does earn “aanything” on AA, as China Southern is not an AA airline partner. Segments marketed as CZ earn nothing at this time.
And AA miles can never be redeemed on codeshares, they must be redeemed as prime flights on partner airlines (though iirc some CX-KA flights might be the exception?)