Merge pull request 'fix-release-1.0.0/yjc-migrate' (#1) from fix-release-1.0.0/yjc-migrate into master

Reviewed-on: #1
This commit is contained in:
yjc 2025-12-02 08:17:38 +00:00
commit afb8dbaed2
3 changed files with 7 additions and 4 deletions

View File

@ -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);
}
}
}

View File

@ -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;

View File

@ -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;