Very recently a fast radio burst (FRB) 200428 associated with a strong X-ray burst from the Galactic magnetar SGR 1935+2154 has been detected, which is direct evidence supporting the magnetar progenitor models of FRBs. Assuming the FRB radiation mechanism is synchrotron maser emission from magnetized shocks, we develop a specific scenario by introducing a density jump structure of upstream medium, and thus the double-peaked character of FRB 200428 is a natural outcome. The luminosity and emission frequency of two pulses can be well explained in this scenario. Furthermore, we find that the synchrotron emission of shock-accelerated electrons is in the X-ray band, which therefore can be responsible for at least a portion of observed X-ray fluence. With proper upgrade, this density jump scenario can be potentially applied to FRBs with multiple peaks in the future.