Substituted cyclohexane derivatives for treating diseases