From 869daf9a95f783a7f379f69e8d0c9868fc53dedc Mon Sep 17 00:00:00 2001 From: jianghanbo Date: Thu, 19 Sep 2024 10:06:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=8C=E5=9F=8E=E7=8A=B6=E6=80=81?= =?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/SpiderDy.php | 10 +++++++++- service/app/server/Orders.php | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/service/app/command/SpiderDy.php b/service/app/command/SpiderDy.php index f832a4e5..2a625e7e 100644 --- a/service/app/command/SpiderDy.php +++ b/service/app/command/SpiderDy.php @@ -65,7 +65,15 @@ class SpiderDy extends Command protected function poolUser($status = 0, $categoryDesc = '') { - $routeType = AdminController::ROUTE_LISTS[mb_substr($categoryDesc, 0, 2)] ?? 10; + $routeType = 10; + // 抖音境内外类型判断 + $abroadKeyWords = ['曼谷', '港', '澳', '泰国', '普吉岛', '境外']; + foreach ($abroadKeyWords as $kw) { + if (mb_strpos($categoryDesc, $kw) !== false) { + $routeType = 20; + break; + } + } $status .= $routeType; if (empty($this->_redis_pool[$status])) { $this->_redis_pool[$status] = Redis::hGetAll('CRM:Pool:' . $status); diff --git a/service/app/server/Orders.php b/service/app/server/Orders.php index 89648877..9db6ac0c 100644 --- a/service/app/server/Orders.php +++ b/service/app/server/Orders.php @@ -17,7 +17,8 @@ class Orders { // ((os=1 and order_status=3) or (os=2 and order_status=4) or (os=3 and order_status=1)) return (in_array($order->os, [1, 7]) && $order->order_status == 3) || ($order->os == 2 && $order->order_status == 4) - || (in_array($order->os, [3, 5]) && in_array($order->order_status, [1, 5])); + || (in_array($order->os, [3, 5]) && in_array($order->order_status, [1, 5])) + || (in_array($order->os, [6]) && in_array($order->order_status, [200])); } /** @@ -117,6 +118,14 @@ class Orders { } } + break; + case 6: + $tc = new Tongcheng($order->os); + $it = $tc->get(1, null, null, $order->sn); + + if ($it) { + $got = $it[0]; + } break; } From cad082fc7e02a9c90e07c384a437f56dfb7841ce Mon Sep 17 00:00:00 2001 From: jianghanbo Date: Thu, 19 Sep 2024 10:29:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B5=81=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/app/admin/controller/AdminController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/app/admin/controller/AdminController.php b/service/app/admin/controller/AdminController.php index 14bbb4e0..aa6b4d91 100644 --- a/service/app/admin/controller/AdminController.php +++ b/service/app/admin/controller/AdminController.php @@ -26,8 +26,8 @@ class AdminController extends base } if($typeDesc = $request->get('type_desc')) { - $routeType = self::ROUTE_LISTS[mb_substr($typeDesc, 0, 2)] ?? 10; - $query->where('route_type', $routeType); + //$routeType = self::ROUTE_LISTS[mb_substr($typeDesc, 0, 2)] ?? 10; + //$query->where('route_type', $routeType); } $list = $query->paginate($request->get('limit',10));