<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\PayCenter\Command; use Carbon\Carbon; use Illuminate\Console\Command; use Illuminate\Support\Facades\Event; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Util\EventUtil; use Module\PayCenter\Events\OrderExpiredEvent; use Module\PayCenter\Type\PayOrderStatus; class PayOrderExpireCheckCommand extends Command { protected $signature = 'PayCenter:PayOrderExpireCheck'; public function handle() { $qhpxU = ModelUtil::model('pay_order')->where(array('status' => PayOrderStatus::NEW_ORDER))->where('created_at', '<', date('Y-m-d H:i:s', time() - 1800))->get()->toArray(); foreach ($qhpxU as $MZHZc) { goto NWi6O; cYygL: $Z8J51 = new OrderExpiredEvent(); goto ZOGsk; KMbMl: $Z8J51->bizId = $MZHZc['bizId']; goto U03N3; U03N3: $Z8J51->order = $MZHZc; goto zMUzx; zMUzx: EventUtil::fire($Z8J51); goto VaL0R; NWi6O: ModelUtil::update('pay_order', $MZHZc['id'], array('status' => PayOrderStatus::CLOSED_EXPIRED, 'timeClosed' => Carbon::now())); goto cYygL; ZOGsk: $Z8J51->biz = $MZHZc['biz']; goto KMbMl; VaL0R: } } }