From bcfaa2a98377c80ec8387fd663910c0002541d8f Mon Sep 17 00:00:00 2001 From: gzydong <837215079@qq.com> Date: Wed, 19 Jan 2022 22:09:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=85=BC=E5=AE=B9=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Command/TestCommand.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/app/Command/TestCommand.php b/app/Command/TestCommand.php index c519ec2..97eb535 100644 --- a/app/Command/TestCommand.php +++ b/app/Command/TestCommand.php @@ -50,26 +50,4 @@ class TestCommand extends HyperfCommand // 'type' => 1, // ]); } - - - // 更新好友表数据 - public function updateData() - { - $max = Contact::max('id'); - Contact::where('id', '<=', $max)->chunk(1000, function ($rows) { - $arr = []; - foreach ($rows as $row) { - $arr[] = [ - 'user_id' => $row->friend_id, - 'friend_id' => $row->user_id, - 'status' => 1, - 'remark' => '', - 'updated_at' => date('Y-m-d H:i:s'), - 'created_at' => date('Y-m-d H:i:s'), - ]; - } - - Contact::insert($arr); - }); - } }