A dark matter model that reconciles tensions between the cosmic-ray e± excess and the gamma-ray and CMB constraints