public JsonResult CancelIdentify(int id) { AjaxResult result = new AjaxResult(); try { UserService service = new UserService(); User user = service.GetUserById(id); if (user.Vip.HasValue && user.Vip == (int)VipState.VIP) { result.ExceptionInfo = "该用户是VIP会员,不能取消认证。如确实需要,请先取消VIP会员之后重新尝试"; } else if (!service.CancelIdentify(id)) { result.ExceptionInfo = "取消会员认证失败"; } } catch (Exception ex) { LogService.Log("CancelIdentify", ex.ToString()); result.ExceptionInfo = "取消会员认证失败"; } return Json(result); }