From a4cac13c414de96c132cf3d2cec66e0b74355e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=BB=BA=E7=82=8A?= <924182103@qq.com> Date: Mon, 26 May 2025 15:46:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BA=97=E9=93=BA=E8=BD=AF=E5=88=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Shop.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Shop.php b/app/Models/Shop.php index 8e7d8d0..a636c5f 100644 --- a/app/Models/Shop.php +++ b/app/Models/Shop.php @@ -4,10 +4,11 @@ namespace App\Models; use App\Models\traits\Filter; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; class Shop extends Model { - use Filter; + use Filter,SoftDeletes; public static $PLAT_KTT = 1; public static $PLAT_MX = 0; -- 2.47.2 From 4b95b67e54f2e1ad93dae69aad72e9ae3011ed38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=BB=BA=E7=82=8A?= <924182103@qq.com> Date: Tue, 2 Dec 2025 16:08:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BA=97=E9=93=BA=E8=BD=AF=E5=88=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/KttOrderQuery.php | 7 ++++--- app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/KttOrderQuery.php b/app/Console/Commands/KttOrderQuery.php index d94243e..d139c1a 100644 --- a/app/Console/Commands/KttOrderQuery.php +++ b/app/Console/Commands/KttOrderQuery.php @@ -15,7 +15,7 @@ class KttOrderQuery extends Command * * @var string */ - protected $signature = 'ktt:order_query'; + protected $signature = 'ktt:order_query {start?}'; /** * The console command description. @@ -44,9 +44,10 @@ class KttOrderQuery extends Command { $shops = Shop::query()->where('plat_id', Shop::$PLAT_KTT)->where('status', Shop::$STATUS_AUTHORIZED)->get(); $endTime = DateTimeUtils::getMicroTime(); - $beginTime = $endTime - 63000; + $start = $this->argument('start'); + $beginTime = $start??($endTime - 69000); foreach ($shops as $shop) { - BusinessFactory::init()->make($shop->plat_id)->setShop($shop)->downloadOrdersAndSave($beginTime, $endTime + 3000); + BusinessFactory::init()->make($shop->plat_id)->setShop($shop)->downloadOrdersAndSave($beginTime, $endTime - 6000); } } } diff --git a/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php b/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php index 1d8af29..2c28425 100644 --- a/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php +++ b/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php @@ -116,6 +116,7 @@ class KuaiTuanTuan extends BusinessClient [$type, $appendParams] = Order::downloadOrders($beginTime, $endTime, $page); $responseName = 'ktt_order_list_response'; } + $res = $this->doRequest($type, $appendParams); if (!isset($res[$responseName])) { return; -- 2.47.2