其他订单打印
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user