With Star Alliance earning is based on the operators fare class, if eligible. That may not be same as the marketing airlines fare class
With OneWorld alliance earning is based on the marketing fare class, if operator is eligible.
That HKG AKL codeshare may only able to be credited to CX Asia miles or NZ airpoints ffp. Codeshare can be problematic