<?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() { $MCyeh = 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 ($MCyeh as $v9Xk2) { goto l5_aA; l5_aA: ModelUtil::update('pay_order', $v9Xk2['id'], array('status' => PayOrderStatus::CLOSED_EXPIRED, 'timeClosed' => Carbon::now())); goto CK_uG; UwwhU: $zt93p->biz = $v9Xk2['biz']; goto t1eAl; t1eAl: $zt93p->bizId = $v9Xk2['bizId']; goto vjJys; CK_uG: $zt93p = new OrderExpiredEvent(); goto UwwhU; vjJys: $zt93p->order = $v9Xk2; goto BYMBc; BYMBc: EventUtil::fire($zt93p); goto NLIOO; NLIOO: } } }