From 923abf457a5b87c6f68d9fbe84d08de3f97e8360 Mon Sep 17 00:00:00 2001 From: jianghanbo Date: Tue, 10 Sep 2024 10:29:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=80=BB=E8=BE=91=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/app/command/SpiderDy.php | 2 +- service/app/command/SpiderMt.php | 5 +++-- service/app/command/SpiderTc.php | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/service/app/command/SpiderDy.php b/service/app/command/SpiderDy.php index 7db7e6cc..f832a4e5 100644 --- a/service/app/command/SpiderDy.php +++ b/service/app/command/SpiderDy.php @@ -396,7 +396,7 @@ class SpiderDy extends Command } // 数据小于50, 结束 - if (count($list) < 50) { + if (empty($list)) { break; } $page++; diff --git a/service/app/command/SpiderMt.php b/service/app/command/SpiderMt.php index 2e636804..96b2c36d 100644 --- a/service/app/command/SpiderMt.php +++ b/service/app/command/SpiderMt.php @@ -161,7 +161,7 @@ class SpiderMt extends Command } if ($orderid) { - //$this->reloadStatus($orderid, $os, $output); + $this->reloadStatus($orderid, $os, $output); } // $this->checks($output); @@ -416,7 +416,7 @@ class SpiderMt extends Command } // 数据小于50, 结束 - if (count($list) < 50) { + if (empty($list)) { break; } $page++; @@ -441,6 +441,7 @@ class SpiderMt extends Command $item = Orders::where($w)->find(); if (empty($item)) { $output->writeln('没有找到订单'); + return; } $it = null; switch ($item->os) { diff --git a/service/app/command/SpiderTc.php b/service/app/command/SpiderTc.php index f5ff57e6..85032f0f 100644 --- a/service/app/command/SpiderTc.php +++ b/service/app/command/SpiderTc.php @@ -192,7 +192,7 @@ class SpiderTc extends Command private function orders($start = null, $end = null, $order_id = false) { foreach (Orders::OSS as $k => $os) { - $pages = 6; + $pages = 10; $page = 1; while (true) { if ($page > $pages) break; @@ -261,7 +261,7 @@ class SpiderTc extends Command } // 数据小于50, 结束 - if (count($list) < 50) { + if (empty($list)) { break; } $page++;