Optimization of parameters and study of joint microstructure of resistance spot welding of magnesium alloy