Solutions for a class of Schrödinger–Poisson system in bounded domains