When passing through a phase transition, electronic system saves energy by opening energy gaps at the Fermi level. Delineating the energy gap anisotropy provides insights into the origin of the interactions that drive the phase transition. Here, we report the angle-resolved photoemission spectroscopy (ARPES) study on the detailed gap anisotropies in both the tetragonal magnetic and superconducting phases in Sr$_{1-x}$Na$_x$Fe$_2$As$_2$. First, we found that the spin-density-wave (SDW) gap is strongly anisotropic in the tetragonal magnetic phase. The gap magnitude correlates with the orbital character of Fermi surface closely. Second, we found that the SDW gap anisotropy is isostructural to the superconducting gap anisotropy regarding to the angular dependence, gap minima locations, and relative gap magnitudes. Our results indicate that the superconducting pairing interaction and magnetic interaction share the same origin. The intra-orbital scattering plays an important role in constructing these interactions resulting in the orbital-selective magnetism and superconductivity in iron-based superconductors.