分页逻辑调整

This commit is contained in:
jianghanbo 2024-09-10 10:29:22 +08:00
parent 42e4dcd44b
commit 923abf457a
3 changed files with 6 additions and 5 deletions

View File

@ -396,7 +396,7 @@ class SpiderDy extends Command
} }
// 数据小于50, 结束 // 数据小于50, 结束
if (count($list) < 50) { if (empty($list)) {
break; break;
} }
$page++; $page++;

View File

@ -161,7 +161,7 @@ class SpiderMt extends Command
} }
if ($orderid) { if ($orderid) {
//$this->reloadStatus($orderid, $os, $output); $this->reloadStatus($orderid, $os, $output);
} }
// $this->checks($output); // $this->checks($output);
@ -416,7 +416,7 @@ class SpiderMt extends Command
} }
// 数据小于50, 结束 // 数据小于50, 结束
if (count($list) < 50) { if (empty($list)) {
break; break;
} }
$page++; $page++;
@ -441,6 +441,7 @@ class SpiderMt extends Command
$item = Orders::where($w)->find(); $item = Orders::where($w)->find();
if (empty($item)) { if (empty($item)) {
$output->writeln('没有找到订单'); $output->writeln('没有找到订单');
return;
} }
$it = null; $it = null;
switch ($item->os) { switch ($item->os) {

View File

@ -192,7 +192,7 @@ class SpiderTc extends Command
private function orders($start = null, $end = null, $order_id = false) private function orders($start = null, $end = null, $order_id = false)
{ {
foreach (Orders::OSS as $k => $os) { foreach (Orders::OSS as $k => $os) {
$pages = 6; $pages = 10;
$page = 1; $page = 1;
while (true) { while (true) {
if ($page > $pages) break; if ($page > $pages) break;
@ -261,7 +261,7 @@ class SpiderTc extends Command
} }
// 数据小于50, 结束 // 数据小于50, 结束
if (count($list) < 50) { if (empty($list)) {
break; break;
} }
$page++; $page++;