From fc07f7f5244ff4c37f69a6bb52ba7d8cb186a49e Mon Sep 17 00:00:00 2001 From: jianghanbo Date: Mon, 19 Aug 2024 11:33:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=98=AF=E4=B8=BB=E6=92=AD?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/app/command/SpiderMt.php | 2 +- service/app/model/Orders.php | 6 +++--- service/app/server/Meituan.php | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/service/app/command/SpiderMt.php b/service/app/command/SpiderMt.php index 76bbb62c..64c23724 100644 --- a/service/app/command/SpiderMt.php +++ b/service/app/command/SpiderMt.php @@ -381,7 +381,7 @@ class SpiderMt extends Command $item = Orders::where('os', $order->os)->where('sn', $order->sn)->find(); if (empty($item)) { - $order->is_zhibo = $this->zhibo($order->product_name, $order->os); + //$order->is_zhibo = $this->zhibo($order->product_name, $order->os); $oldMobile = orders::where("os", $order->os)->where("mobile", $order->mobile) ->where("create_time", '>=', time() - 24 * 3600 * 3)->find(); diff --git a/service/app/model/Orders.php b/service/app/model/Orders.php index 3687e1f1..869f8c23 100644 --- a/service/app/model/Orders.php +++ b/service/app/model/Orders.php @@ -21,9 +21,9 @@ class Orders extends base // 0 1 2 3 4 5 6 7 8 const AllOssStatusSql = [ - 1 => '((os=1 and order_status=3) or (os=2 and order_status=4) or (os=3 and order_status=1))', //待使用 - 2 => '((os=1 and order_status=4) or (os=2 and order_status=5) or (os=3 and order_status=2))', //已核销 - 3 => '((os=1 and order_status=5) or (os=3 and order_status=4))' //已退款(快手暂无已退款状态) + 1 => '((os=1 and order_status=3) or (os=2 and order_status=4) or (os in ("3", "5") and order_status=1))', //待使用 + 2 => '((os=1 and order_status=4) or (os=2 and order_status=5) or (os in ("3", "5") and order_status=2))', //已核销 + 3 => '((os=1 and order_status=5) or (os in ("3", "5") and order_status=4))' //已退款(快手暂无已退款状态) ]; const StatusName = ['待跟进', '跟进中', '已核销', '核销失败', '放弃跟单']; diff --git a/service/app/server/Meituan.php b/service/app/server/Meituan.php index 4be50080..b1b6c9a2 100644 --- a/service/app/server/Meituan.php +++ b/service/app/server/Meituan.php @@ -17,7 +17,7 @@ class Meituan { } public function login() { - + } public function voucher($check_sn) { @@ -103,12 +103,13 @@ class Meituan { $item->order_status = $order->orderStatus; $item->refund_status = $order->refundStatus; $item->category_desc = $order->categoryDesc; + $item->is_zhibo = $order->bizOrderChannel == 5 ? 1 : 0; // 是否直播(5-视频号,3-小程序) $item->asset_price = $order->orderStatus == 4 ? $order->totalPrice: 0; //已核销订单,核销金额为订单金额 $_list[] = $item; } } - + return $_list; //返回半成品 } @@ -132,7 +133,7 @@ class Meituan { } $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"',