Two boundary conditions of free electron gas model

Consider free electron gas in a rectangular solid with each side length $$L_x$$, $$L_y$$, $$L_z$$.

"Griffiths <Introduction to Quantum Mechanics>" use infinite square barrier as fixed boundary condition. e.i. $$\psi(0)=\psi(L_{x,y,z})=0$$, this lead to quantum numbers positive integers $$n_{x,y,z}=1,2, ...$$ corresponding to standing wave solutions $$\psi=\sqrt{\frac{8}{V}}sin(\frac{n_x\pi}{L_x})sin(\frac{n_y\pi}{L_y})sin(\frac{n_z\pi}{L_z})$$ with $$E=\frac{\hbar^2k^2}{2m}, k_{x,y,z}=\frac{n\pi}{L_{x,y,z}}$$.

But "Ashcroft&Mermin <Solid State Physics>" use periodic boundary conditions. e.i. $$\psi(x,y,z)=\psi(x,y,z+L_z);\psi(x,y,z)=\psi(x+L_x,y,z);\psi(x,y,z)=\psi(x,y+L_y,z)$$. Thus this time the quantum numbers are just integers $$n_{x,y,z}=0,\pm1,\pm2, ...$$ corresponding to running wave solutions $$\psi=\sqrt{\frac{1}{V}}e^{ikr}$$ with $$E=\frac{\hbar^2k^2}{2m}, k_{x,y,z}=\frac{2n\pi}{L_{x,y,z}}$$.

These two boundary conditions give very different energy levels. For instance, the ground state wavefunction of fixed boundary condition is $$\psi_{111}$$ since n cannot be zero. But for periodic boundary conditons we can have state like $$\psi_{100}, \psi_{110}$$ since n can be zero. I am confused by the difference in these two books. So what is the real ground state of a electron gas model? Or in what condition should we use these two different boundary?

Do they? In one dimension, the energy levels look like this (where the animation takes the thermodynamic limit $$L\rightarrow \infty$$):
Operationally, the two models yield the same predictions in the limit $$L\rightarrow \infty$$. By that I mean that if you fix $$L$$ to be finite and compute some measurable prediction of the model, then the result will generically depend on the boundary conditions you've applied - however, if you subsequently take the limit as $$L\rightarrow\infty$$, then the differences in the two predictions will disappear. In that sense, the boundary conditions don't really matter. The periodic conditions tend to make things slightly easier, so those are the ones which are usually employed, but in principle it's up to you.