xielin 5 years ago
parent
commit
5dc5117fd5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/Repositories/Circle/CircleMessageRepository.php

+ 3 - 3
app/Repositories/Circle/CircleMessageRepository.php

@@ -272,8 +272,8 @@ class CircleMessageRepository
                 Redis::DEL('circle_message_new_reply_' . $newComment->parent_id);
                 Log::debug('删除回复缓存'.$newComment->id);
             } else {
-                Redis::DEL('circle_message_new_comment_' . $newComment->post_id);
-                Log::debug('删除评论缓存'.$newComment->id);
+                Redis::DEL('circle_message_new_comment_' . $newComment->msg_id);
+                Log::debug('删除评论缓存'.$newComment->msg_id);
             }
             $key = "community_calc_circle_score";
             Redis::sadd($key,$request['msg_id']);
@@ -413,7 +413,7 @@ class CircleMessageRepository
 
             DB::commit();
             if (!$comment->parent_id) {
-                Redis::DEL('circle_message_new_comment_' . $comment->post_id);
+                Redis::DEL('circle_message_new_comment_' . $comment->msg_id);
             } else {
                 Redis::DEL('circle_message_new_reply_' . $comment->id);
             }