Infinitely many solutions for a class of Dirichlet boundary value problem with impulsive effects