public virtual void DeleteSys(int postId) { ContentPost post = ContentPost.findById(postId); if (post == null) { return; } post.SaveStatus = SaveStatus.SysDelete; post.update(); ContentPostSection.updateBatch("SaveStatus=" + SaveStatus.SysDelete, "PostId=" + post.Id); }
public virtual void Restore(int id) { ContentPost post = ContentPost.findById(id); if (post == null) { return; } post.SaveStatus = SaveStatus.Normal; post.update(); ContentPostSection.updateBatch("SaveStatus=" + SaveStatus.Normal, "PostId=" + post.Id); }
public virtual void DeleteBatch(string ids) { ContentPost.updateBatch("set SaveStatus=" + SaveStatus.Delete, "Id in (" + ids + ")"); ContentPostSection.updateBatch("SaveStatus=" + SaveStatus.Delete, "PostId in(" + ids + ")"); }
public virtual void Delete(ContentPost post) { post.SaveStatus = SaveStatus.Delete; post.update(); ContentPostSection.updateBatch("SaveStatus=" + SaveStatus.Delete, "PostId=" + post.Id); }