Gerber-Shiu function of a discrete risk model with and without a constant dividend barrier