123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace app\common\command;
- use app\common\model\Produce;
- use app\common\service\ZopOrderService;
- use app\service\EsMobileService;
- use Exception;
- use think\console\Command;
- use think\console\Input;
- use think\console\Output;
- class ZopOrderMsgCommand extends Command
- {
- protected function configure()
- {
- $this->setName('order:msg')->setDescription('获取zop联通订单消息');
- }
- protected function execute(Input $input, Output $output)
- {
- $this->output->info("开始获取联通订单消息");
-
-
-
- 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("获取联通订单消息完成");
- }
- }
|