setName('order:msg')->setDescription('获取zop联通订单消息'); } protected function execute(Input $input, Output $output) { $this->output->info("开始获取联通订单消息"); // 获取所有商品信息中的消息渠道编码 // $messageChannelCodes = Produce::where('message_channel_code', 'not null')->column('message_channel_code'); // foreach ($messageChannelCodes as $messageChannelCode) { try { $result = ZopOrderService::orderMsg(); if ($result['code'] == 0) { $this->output->info("获取联通订单消息成功"); } else { $this->output->info("获取联通订单消息失败: " . $result['message'] ?? ''); } } catch (Exception $e) { $this->output->info("获取联通订单消息失败: " . $e->getMessage()); } // } $this->output->info("获取联通订单消息完成"); } }