Theory of spin dynamics in electron-doped high-Tcsuperconductors