pathfinder 1e – Piercing damage reduction with a spell that adds piercing damage to weapons

It would be the first option, except that the DR is good AND piercing. Gotta be careful that you meet all the criteria for overcoming the DR, and yes, I see you have listed that the attack is already good, but it must be good aligned. Such as with align weapon. Merely being LG, NG, or CG isnt enough.

If the DR was only piercing then only the damage from the spell thorn body is piercing, it does not affect the rest of the damage during the attack. So as you said, the spell damage is full, and then you reduce the DR from the rest of the damage.