public IActionResult CancelAppointment(int Id) { int h; try { h = bll.CancelAppointment(Id); } catch (Exception ex) { log.Error(ex.Message); throw; } return(Ok(new { state = h > 0 ? true : false, msg = h > 0 ? "取消预约成功" : "取消预约失败" })); }