mall->getMallSettingOne('over_time'); if (is_numeric($orderAutoCancelMinute) && $orderAutoCancelMinute >= 0) { CommonLog::saveLog($this->event->order->id,'添加自动取消延迟队列'); // 订单自动取消任务 \Yii::$app->queue->delay($orderAutoCancelMinute * 60)->push(new OrderCancelJob([ 'orderId' => $this->event->order->id, ])); $autoCancelTime = $this->event->order->created_at + $orderAutoCancelMinute * 60; $this->event->order->auto_cancel_time = $autoCancelTime; $this->event->order->save(); } return $this; } /** * 购物车商品购买后删除 */ protected function deleteCartGoods() { Cart::deleteAll(['id' => $this->event->cartIds]); CommonLog::saveLog($this->event->order->id,'删除购物车'); } }