zealerChina 1 tahun lalu
induk
melakukan
b214155964

+ 5 - 5
application/common/command/ZopOrderMsgCommand.php

@@ -20,19 +20,19 @@ class ZopOrderMsgCommand extends Command
     {
         $this->output->info("开始获取联通订单消息");
         // 获取所有商品信息中的消息渠道编码
-        $messageChannelCodes = Produce::where('message_channel_code', 'not null')->column('message_channel_code');
-        foreach ($messageChannelCodes as $messageChannelCode) {
+        // $messageChannelCodes = Produce::where('message_channel_code', 'not null')->column('message_channel_code');
+        // foreach ($messageChannelCodes as $messageChannelCode) {
             try {
-                $result = ZopOrderService::orderMsg($messageChannelCode);
+                $result = ZopOrderService::orderMsg();
                 if ($result['code'] == 0) {
                     $this->output->info("获取联通订单消息成功");
                 } else {
-                    $this->output->info("获取联通订单消息失败: " . $result['message']);
+                    $this->output->info("获取联通订单消息失败: " . $result['message'] ?? '');
                 }
             } catch (Exception $e) {
                 $this->output->info("获取联通订单消息失败: " . $e->getMessage());
             }
-        }
+        // }
 
         $this->output->info("获取联通订单消息完成");
     }

+ 4 - 1
application/common/service/ZopOrderService.php

@@ -580,9 +580,10 @@ class ZopOrderService extends ZopBaseService
      *
      * @return void
      */
-    public static function orderMsg($messageChannelCode = '', $type = 4)
+    public static function orderMsg($type = 4)
     {
         // $messageChannelCode = config('site.message_channel_code');
+        $messageChannelCode = 'mass';
         if (empty($messageChannelCode)) {
             common_log('获取订单消息请求失败: 消息渠道编码为空');
 
@@ -668,6 +669,8 @@ class ZopOrderService extends ZopBaseService
 
             self::delOrderMsg($delMsgIds, $type);
         }
+
+        return self::success();
     }
 
     /**