From e63eb847a6556a0539abfd4850061c7bdd167c32 Mon Sep 17 00:00:00 2001 From: jianghanbo Date: Mon, 14 Oct 2024 09:06:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E7=BA=BF=E8=B7=AF=E5=88=86=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/app/admin/controller/OrderController.php | 2 +- service/app/command/SpiderDy.php | 8 +++++++- service/app/command/SpiderMt.php | 5 ++--- service/app/command/SpiderTc.php | 8 +++++++- service/app/server/Orders.php | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/service/app/admin/controller/OrderController.php b/service/app/admin/controller/OrderController.php index 4d2c1401..d636513e 100644 --- a/service/app/admin/controller/OrderController.php +++ b/service/app/admin/controller/OrderController.php @@ -96,7 +96,7 @@ class OrderController extends base $admin_id = Admins::where('username', $admin)->value('id'); $query->where('admin_id', $admin_id); } -Log::info($query->getLastSql()); + $excel = $request->get('excel'); if($excel == 1) { $orders = $query->select(); diff --git a/service/app/command/SpiderDy.php b/service/app/command/SpiderDy.php index 744bebe3..7650d336 100644 --- a/service/app/command/SpiderDy.php +++ b/service/app/command/SpiderDy.php @@ -366,7 +366,13 @@ class SpiderDy extends Command if (!empty($oldMobile)) { $admin_id = $oldMobile->admin_id; } else { - $admin_id = $this->poolUser($order->orderStatus, $order->category_desc); + // $admin_id = $this->poolUser($order->orderStatus, $order->category_desc); + try { + $admin_id = \app\server\Orders::poolUser($order->orderStatus, $order->product_id); + } catch (\Exception $exception) { + Log::info(sprintf('dy create order fail:%s, order_id:%s', $exception->getMessage(), $order->sn)); + continue; + } } if (empty($admin_id)) return null; diff --git a/service/app/command/SpiderMt.php b/service/app/command/SpiderMt.php index d0def1ef..cba3fe2b 100644 --- a/service/app/command/SpiderMt.php +++ b/service/app/command/SpiderMt.php @@ -378,16 +378,15 @@ class SpiderMt extends Command $admin_id = $oldMobile->admin_id; } else { try { - $admin_id = $this->poolUser($order->orderStatus, $order->category_desc); + // $admin_id = $this->poolUser($order->orderStatus, $order->category_desc); + $admin_id = \app\server\Orders::poolUser($order->orderStatus, $order->product_id); } catch (\Exception $exception) { Log::info(sprintf('mt create order fail:%s, order_id:%s', $exception->getMessage(), $order->sn)); continue; } } - if (empty($admin_id)) return null; } - $order->admin_id = $admin_id; $order->give_time = time(); diff --git a/service/app/command/SpiderTc.php b/service/app/command/SpiderTc.php index 29985028..e3e0d8be 100644 --- a/service/app/command/SpiderTc.php +++ b/service/app/command/SpiderTc.php @@ -226,7 +226,13 @@ class SpiderTc extends Command if (!empty($oldMobile)) { $admin_id = $oldMobile->admin_id; } else { - $admin_id = $this->poolUser($order->orderStatus, $order->category_desc); + // $admin_id = $this->poolUser($order->orderStatus, $order->category_desc); + try { + $admin_id = \app\server\Orders::poolUser($order->orderStatus, $order->product_id); + } catch (\Exception $exception) { + Log::info(sprintf('tc create order fail:%s, order_id:%s', $exception->getMessage(), $order->sn)); + continue; + } } if (empty($admin_id)) return null; diff --git a/service/app/server/Orders.php b/service/app/server/Orders.php index b8c5ce4c..ed655360 100644 --- a/service/app/server/Orders.php +++ b/service/app/server/Orders.php @@ -250,7 +250,7 @@ class Orders { * @throws \Exception */ public static function poolUser($status, $thirdProductId) { - $status .= $thirdProductId; + // $status .= $thirdProductId; if (empty(self::$redisPool[$status])) { self::$redisPool[$status] = Redis::hGetAll('CRM:Pool:' . $status); $users = self::users($thirdProductId);