SNR Analysis for RIS-Aided Communication System in Near- and Far-Fields