6
0
Fork 0
jiqu-library-server/app/Console/Commands/OfflineOrderShip.php

48 lines
905 B
PHP

<?php
namespace App\Console\Commands;
use App\Models\OfflineOrder;
use App\Services\OfflineOrderService;
use Illuminate\Console\Command;
class OfflineOrderShip extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'offline-order:ship {id}';
/**
* The console command description.
*
* @var string
*/
protected $description = '线下订单发货';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$id = $this->argument('id');
$order = OfflineOrder::findOrFail($id);
OfflineOrderService::make()->orderShip($order);
return 0;
}
}