public JsonResult Comment(Comment comment) { if (comment.HotelID > 0 && comment.OrderID > 0 && !string.IsNullOrEmpty(comment.UserWeixinID) && !string.IsNullOrEmpty(comment.HotelWeixinID) && !string.IsNullOrEmpty(comment.Content)) { comment.AvgScore = (decimal)Math.Round((comment.HealthServiceScore + comment.AttitudeServiceScore + comment.FacilityServiceScore + comment.NetworkServiceScore) / 4.0, 1); comment.IsShow = true; commentService.CommentHotel(comment); return(Json(new { state = 0, msg = "评价成功!" })); } return(Json(new { state = -1, msg = "评价失败!请稍后重试!" })); }