28 lines
738 B
PHP
28 lines
738 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
use Modules\EcommerceFinance\Services\Jushuitan\ShippingReplicaSynchronizer;
|
|
|
|
/**
|
|
* 一次性:删除现有发货数据里以 @ 开头、去@后已存在的重复单号。
|
|
* php artisan jst:dedup-at
|
|
*/
|
|
class DedupAt extends Command
|
|
{
|
|
protected $signature = 'jst:dedup-at';
|
|
|
|
protected $description = '去除 @ 开头的重复单号(去@后已存在则删)';
|
|
|
|
public function handle(): int
|
|
{
|
|
@ini_set('memory_limit', '1024M');
|
|
@set_time_limit(0);
|
|
$removed = ShippingReplicaSynchronizer::make()->dedupAtPrefix();
|
|
$this->info('去除@重复单号:' . $removed . ' 条');
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|