params = $params; } /** * Execute the job. * * @return void */ public function handle() { $currency_quotation = CurrencyQuotation::where('match_id', 46)->first(); if(!empty($currency_quotation)){ $currency_id = $currency_quotation->currency_id; $legal_id = $currency_quotation->legal_id; $now_price = $currency_quotation->now_price; CoinTradeLogic::matchBuyTrade($currency_id,$legal_id,$now_price); CoinTradeLogic::matchSellTrade($currency_id,$legal_id,$now_price); } extract($this->params); $match = CurrencyMatch::where([ 'legal_id' => $legal_id, 'currency_id' => $currency_id, 'open_coin_trade' => 1, 'coin_trade_success' => 1 ])->first(); if(!$match){ return; } if (bc_comp($now_price, 0) > 0) { CoinTradeLogic::matchBuyTrade($currency_id,$legal_id,$now_price); CoinTradeLogic::matchSellTrade($currency_id,$legal_id,$now_price); // LeverTransaction::newPrice($legal_id, $currency_id, $now_price); // } else { } } }