From d97b184a5d0a1106bc28f7c09f71bf916ff948c7 Mon Sep 17 00:00:00 2001 From: jianghanbo Date: Tue, 5 Nov 2024 14:42:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/app/model/Orders.php | 2 +- service/app/server/Douyin.php | 6 +++--- service/app/server/Kuaishou.php | 9 +++++---- service/app/server/Meituan.php | 5 +++-- service/app/server/Tongcheng.php | 4 ++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/service/app/model/Orders.php b/service/app/model/Orders.php index 58cc779b..1a1bd660 100644 --- a/service/app/model/Orders.php +++ b/service/app/model/Orders.php @@ -196,4 +196,4 @@ class Orders extends base { return $this->hasOne(ThirdMobileLogs::class, 'mobile', 'mobile'); } -} \ No newline at end of file +} diff --git a/service/app/server/Douyin.php b/service/app/server/Douyin.php index d380fa84..d0fe8a09 100644 --- a/service/app/server/Douyin.php +++ b/service/app/server/Douyin.php @@ -256,7 +256,7 @@ class Douyin $list = $this->_curl("/life/trip/fulfilment/v1/query/certificate_list?end_time={$end}&page_index={$page}&page_size=50&start_time={$start}&root_life_account_id=" . $this->_id(), $params, 'POST'); if (empty($list) || $list->status_code != 0) { Log::error('===查询时间:' . $start . '--' . $end . '====certificate_list: ' . json_encode($list)); - throw new Exception("抖音拉单失败,Err:" . json_encode($list)); + //throw new Exception("抖音拉单失败,Err:" . json_encode($list)); } } // Log::warning('====list=====',['list'=>$list->data->pagination]); @@ -534,11 +534,11 @@ class Douyin if (!isset($res->status_code) || $res->status_code != 0) { Log::info("抖音 os:{$this->os} \n\n"); Log::info( "抖音 body:{$body} \n\n"); - if ($this->tryTimes > 1) { + if ($this->tryTimes > 2) { (new ThirdApiService())->weComNotice($this->os); } $this->tryTimes++; } return $res; } -} \ No newline at end of file +} diff --git a/service/app/server/Kuaishou.php b/service/app/server/Kuaishou.php index 6cee55c0..93906ca7 100644 --- a/service/app/server/Kuaishou.php +++ b/service/app/server/Kuaishou.php @@ -17,7 +17,7 @@ class Kuaishou { public function __construct() { } - + public function _cookie($data = '') { if($data) Redis::set('Kuaishou:cookie', $data); return Redis::get('Kuaishou:cookie'); @@ -85,7 +85,8 @@ class Kuaishou { $list = $this->_curl($this->gate, $params,'POST'); if(empty($list) || $list->success != true) { - throw new \Exception("快手拉单失败,Err:".json_encode($list)); + // throw new \Exception("快手拉单失败,Err:".json_encode($list)); + Log::info("快手拉单失败,Err:".json_encode($list)); } } @@ -150,7 +151,7 @@ class Kuaishou { } $ch = curl_init($http); - + $header = [ 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36', 'Sec-Ch-Ua-Platform: "Windows"', @@ -176,4 +177,4 @@ class Kuaishou { return $json; } -} \ No newline at end of file +} diff --git a/service/app/server/Meituan.php b/service/app/server/Meituan.php index 7c52fb5a..563cd4a4 100644 --- a/service/app/server/Meituan.php +++ b/service/app/server/Meituan.php @@ -73,7 +73,8 @@ class Meituan { $list = $this->_curl('/nib/trade/b/order/search/list', $params); if(empty($list) || $list->code != 0) { - throw new \Exception("美团拉单失败,Err:".json_encode($list)); + // throw new \Exception("美团拉单失败,Err:".json_encode($list)); + Log::info("美团拉单失败,Err:".json_encode($list)); } } @@ -170,4 +171,4 @@ class Meituan { } return $res; } -} \ No newline at end of file +} diff --git a/service/app/server/Tongcheng.php b/service/app/server/Tongcheng.php index 9ef92112..bdfe75ce 100644 --- a/service/app/server/Tongcheng.php +++ b/service/app/server/Tongcheng.php @@ -109,7 +109,7 @@ class Tongcheng { $list = $this->_curl("/merchant/api/market-live/wxVideoV2/supplierOrderByPage", $params, 'POST'); if (empty($list) || $list->code != 1000) { Log::error('===查询时间:' . $start . '--' . $end . '====certificate_list: ' . json_encode($list)); - throw new Exception("同程拉单失败,Err:" . json_encode($list)); + Log::info("美团拉单失败,Err:".json_encode($list)); } } return $list; @@ -280,4 +280,4 @@ class Tongcheng { } return $res; } -} \ No newline at end of file +}