5.1.7 ** Let the geometric sequence $\left\{z_{n}\right\}$ be such that $z_{1}=1, z_{2}=a+b \mathrm{i}, z_{3}=b+a \mathrm{i}(a, b \in \mathbf{R}$, $a>0$ ), find the smallest value of $n$ that satisfies $z_{1}+z_{2}+\cdots+z_{n}=0$, and calculate the value of $z_{1} z_{2} \cdots z_{n}$ at this time.
From the problem, we have $(a+b \mathrm{i})^{2}=(b+a \mathrm{i})$, so we have $\left\{\begin{array}{l}a^{2}-b^{2}=b \\ 2 a b=a .\end{array}\right.$ Solving this, we get $\left\{\begin{array}{l}a=\frac{\sqrt{3}}{2}, \\ b=\frac{1}{2} .\end{array}\right.$ Therefore, $q=z_{2}=\frac{\sqrt{3}}{2}+\frac{1}{2} \mathrm{i}=\cos \frac{\pi}{6}+\mathrm{i} \sin \frac{\pi}{6}$. From $S_{n}=\frac{1-q^{n}}{1-q}=0$ we get $\cos \frac{n \pi}{6}+\mathrm{i} \sin \frac{n \pi}{6}=1$. Thus, $\frac{n \pi}{6}=2 k \pi, n=12 k\left(k \in \mathbf{N}^{*}\right)$. Hence, the minimum value of $n$ is 12, at which point $z_{1} z_{2} \cdots z_{n}=-1$.