xielin преди 5 години
родител
ревизия
5dc5117fd5
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  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);
             }