private void deleteCommentByPost(ForumPost post) { CommentSync objSync = CommentSync.find("PostId=" + post.Id).first(); if (objSync == null) { return; } // 删除此评论 OpenComment comment = objSync.Comment; commentService.Delete(comment); // 删除同步表 CommentSync objSync.delete(); }
private void deletePost(object[] args, object target) { OpenComment comment = args[0] as OpenComment; CommentSync objSync = CommentSync.find("CommentId=" + comment.Id).first(); if (objSync == null) { return; } // 删除帖子 postService.DeleteToTrash(objSync.Post, comment.Member, ""); // 删除同步表 objSync.delete(); // 删除 ForumPost 对应的 Microblog }