public APIReturn Get_item(ulong?Id) { PostsInfo item = Posts.GetItem(Id); if (item == null) { return(new APIReturn(98, "记录不存在,或者没有权限")); } return(new APIReturn(0, "成功", "item", item.ToBson())); }
public APIReturn Post_insert([FromForm] ulong?Posts_id, [FromForm] ulong?Topics_id, [FromForm] ulong?Users_id, [FromForm] string Content, [FromForm] int?Count_good, [FromForm] int?Count_notgood, [FromForm] uint?Index) { PostsInfo item = new PostsInfo(); item.Posts_id = Posts_id; item.Topics_id = Topics_id; item.Users_id = Users_id; item.Content = Content; item.Count_good = Count_good; item.Count_notgood = Count_notgood; item.Create_time = DateTime.Now; item.Index = Index; item = Posts.Insert(item); return(new APIReturn(0, "成功", "item", item.ToBson())); }