店铺软删

This commit is contained in:
杨建炊 2025-12-02 16:08:35 +08:00
parent a4cac13c41
commit 4b95b67e54
2 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,7 @@ class KttOrderQuery extends Command
* *
* @var string * @var string
*/ */
protected $signature = 'ktt:order_query'; protected $signature = 'ktt:order_query {start?}';
/** /**
* The console command description. * 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(); $shops = Shop::query()->where('plat_id', Shop::$PLAT_KTT)->where('status', Shop::$STATUS_AUTHORIZED)->get();
$endTime = DateTimeUtils::getMicroTime(); $endTime = DateTimeUtils::getMicroTime();
$beginTime = $endTime - 63000; $start = $this->argument('start');
$beginTime = $start??($endTime - 69000);
foreach ($shops as $shop) { 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);
} }
} }
} }

View File

@ -116,6 +116,7 @@ class KuaiTuanTuan extends BusinessClient
[$type, $appendParams] = Order::downloadOrders($beginTime, $endTime, $page); [$type, $appendParams] = Order::downloadOrders($beginTime, $endTime, $page);
$responseName = 'ktt_order_list_response'; $responseName = 'ktt_order_list_response';
} }
$res = $this->doRequest($type, $appendParams); $res = $this->doRequest($type, $appendParams);
if (!isset($res[$responseName])) { if (!isset($res[$responseName])) {
return; return;