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); - }); - } }