Ver código fonte

更新评论

wzq 5 anos atrás
pai
commit
fbce2bbe23
1 arquivos alterados com 7 adições e 0 exclusões
  1. 7 0
      app/Repositories/Post/PostRepository.php

+ 7 - 0
app/Repositories/Post/PostRepository.php

@@ -434,6 +434,9 @@ class PostRepository
 
             DB::commit();
 
+            if(!$comment->parent_id){
+                Redis::DEL('post_new_comment_'.$comment->post_id);
+            }
             $virus = $this->behavior->where('behavior_identification', 'comment')->first();
             if ($virus) {
                 if ($post->title) {
@@ -759,6 +762,10 @@ class PostRepository
 
             DB::commit();
             Redis::SADD('delete_post_comment_ids', $comment->id);
+
+            if(!$comment->parent_id){
+                Redis::DEL('post_new_comment_'.$comment->post_id);
+            }
             return Response::create();
 
         } catch (QueryException $exception) {