|
@@ -302,6 +302,8 @@ class PostRepositories
|
|
|
DB::commit();
|
|
|
if(!$comment->parent_id){
|
|
|
Redis::DEL('post_new_comment_'.$comment->post_id);
|
|
|
+ }else{
|
|
|
+ Redis::DEL('post_new_reply_'.$comment->id);
|
|
|
}
|
|
|
return jsonSuccess(['id' => $comment->id], '评论成功');
|
|
|
|
|
@@ -342,6 +344,8 @@ class PostRepositories
|
|
|
DB::commit();
|
|
|
if(!$comment->parent_id){
|
|
|
Redis::DEL('post_new_comment_'.$comment->post_id);
|
|
|
+ }else{
|
|
|
+ Redis::DEL('post_new_reply_'.$comment->id);
|
|
|
}
|
|
|
Redis::SADD('delete_post_comment_ids', $comment->id);
|
|
|
return jsonSuccess('删除评论成功');
|