From 9c4a8b4c04c80ed86818df775c26eb4f2ebc59fc Mon Sep 17 00:00:00 2001 From: gzydong <837215079@qq.com> Date: Fri, 10 Dec 2021 23:47:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Cache/FriendRemark.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Cache/FriendRemark.php b/app/Cache/FriendRemark.php index 7e40b00..e8066e2 100644 --- a/app/Cache/FriendRemark.php +++ b/app/Cache/FriendRemark.php @@ -55,10 +55,9 @@ class FriendRemark extends HashRedis */ public function reload() { - UsersFriend::select(['id', 'user1', 'user2', 'user1_remark', 'user2_remark'])->chunk(200, function ($rows) { + UsersFriend::select(['id', 'user_id', 'friend_id', 'remark'])->chunk(200, function ($rows) { foreach ($rows as $row) { - $row->user1_remark && $this->save($row->user1, $row->user2, $row->user1_remark); - $row->user2_remark && $this->save($row->user2, $row->user1, $row->user2_remark); + $row->remark && $this->save($row->user_id, $row->friend_id, $row->remark); } }); }