<?php
/**
 * Created by PhpStorm.
 * User: z-yang
 * Date: 2020/11/16
 * Time: 15:49
 */

namespace App\Jobs;

use App\Modules\Trade\Services\OrderQuery;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class OrderQueryJob implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    private $trade_no;

    public function __construct(string $trade_no)
    {
        $this->trade_no = $trade_no;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle(){
        OrderQuery::query($this->trade_no);
    }
}