Enhancement or quenching effect of metallic nanodimer on spontaneous emission