From d1cd8c5e53e484fe59087d8cf8280978c4c1924b Mon Sep 17 00:00:00 2001 From: ASUS <515617283@qq.com> Date: Tue, 21 Apr 2026 17:05:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B6=E4=BB=96=E8=AE=A2=E5=8D=95=E6=89=93?= =?UTF-8?q?=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/rabborderprint.php | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/scripts/rabborderprint.php b/scripts/rabborderprint.php index 94052db..d237ad0 100644 --- a/scripts/rabborderprint.php +++ b/scripts/rabborderprint.php @@ -42,6 +42,9 @@ try { $data = $msg->body; Log::info('MQ收到消息[订单打印]--->' . $data . '--->' . $date_time . "\n"); $order = json_decode($data, true); + if(!is_array($order)) { + return; + } // 如果是数字。则打印订单 $is_log = false; $curl_error = ''; @@ -84,23 +87,6 @@ try { // print_r('数组-------->' . json_encode($params_arr_n)) . "\r\n"; Base::setredis_new(json_encode($params_arr_n), $snd_data['send_id']); } -// -// 内部给收银机推送打订单 -// $url = 'http://127.0.0.1:8686/?method=sendToUid&account='. $send_id .'¶ms=' . $snd_data_json; // 替换为你的服务地址和端口 -// $ch = curl_init(); -// curl_setopt($ch, CURLOPT_URL, $url); -// curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); -// $output = curl_exec($ch); -// if (curl_errno($ch)) { -// $is_log = true; -// $curl_error = 'Curl error: ' . curl_error($ch); -// } -// curl_close($ch); -// Log::info('内部通讯结果(订单打印)--->' . $output . '通讯ID--->cashier_' .$order['shop_id']. '---' . date('Y-m-d H:i:s') . "\n"); -// }else { -// $curl_error = 'order Data is empty'; -// $is_log = true; -// } if($is_log) { Db::table('tb_mq_log')->insert([ 'queue' => $queue,