public ApiResult AddBlog(blog blog) { blog.time = DateTime.Now; var insertblg = blogServices.AddBlog(blog); return(new ApiResult() { StatusCode = HttpStatusCode.OK, Message = insertblg.blog_id != 0 ? "success" : "添加失败", Data = new { blogid = insertblg.blog_id } }); }