diff --git a/app/command/ApplySmsTemp.php b/app/command/ApplySmsTemp.php index 9fc4380..c3a04e7 100644 --- a/app/command/ApplySmsTemp.php +++ b/app/command/ApplySmsTemp.php @@ -65,7 +65,7 @@ class ApplySmsTemp extends Command $callback = function ($msg) use ($queue){ $date_time = date('Y-m-d H:i:s'); $data = $msg->body; - Log::info('收到消息--->' . $data . '--->' . $date_time . "\n"); + Log::info('MQ收到消息[申请新短信模版]--->' . $data . '--->' . $date_time . "\n"); // 发给队列 Redis::send('apply.sms.temp', $data); $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']); diff --git a/app/command/BirthdayGiftSms.php b/app/command/BirthdayGiftSms.php index 1c3479f..0ead13b 100644 --- a/app/command/BirthdayGiftSms.php +++ b/app/command/BirthdayGiftSms.php @@ -65,7 +65,7 @@ class BirthdayGiftSms extends Command $callback = function ($msg) use ($queue){ $date_time = date('Y-m-d H:i:s'); $data = $msg->body; - Log::info('收到消息--->' . $data . '--->' . $date_time . "\n"); + Log::info('MQ收到消息[生日有礼]--->' . $data . '--->' . $date_time . "\n"); // 发给队列 Redis::send('birthday.gift.sms', $data); $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']); diff --git a/app/command/RabbOrderPrint.php b/app/command/RabbOrderPrint.php index 0ec76de..67cec90 100644 --- a/app/command/RabbOrderPrint.php +++ b/app/command/RabbOrderPrint.php @@ -18,8 +18,8 @@ use support\Log; class RabbOrderPrint extends Command { - protected static $defaultName = 'RabbOrderPrint'; - protected static $defaultDescription = 'RabbOrderPrint'; + protected static $defaultName = 'rabborderprint'; + protected static $defaultDescription = 'rabborderprint'; /** * @return void @@ -64,7 +64,7 @@ class RabbOrderPrint extends Command $callback = function ($msg) use ($queue){ $date_time = date('Y-m-d H:i:s'); $data = $msg->body; - Log::info('收到消息--->' . $data . '--->' . $date_time . "\n"); + Log::info('MQ收到消息[订单打印]--->' . $data . '--->' . $date_time . "\n"); // 如果是数字。则打印订单 $is_log = false; $curl_error = ''; diff --git a/app/command/RabbProductUpdate.php b/app/command/RabbProductUpdate.php index 9e3495c..0b9f34d 100644 --- a/app/command/RabbProductUpdate.php +++ b/app/command/RabbProductUpdate.php @@ -17,8 +17,8 @@ use support\Log; class RabbProductUpdate extends Command { - protected static $defaultName = 'RabbProductUpdate'; - protected static $defaultDescription = 'RabbProductUpdate'; + protected static $defaultName = 'rabbproductupdate'; + protected static $defaultDescription = 'rabbproductupdate'; /** * @return void @@ -61,8 +61,7 @@ class RabbProductUpdate extends Command $callback = function ($msg) use ($queue){ $date_time = date('Y-m-d H:i:s'); $data = $msg->body; - print_r('收到商品更新消息--->' . $data . '--->' . $date_time . "\n"); - Log::info('收到商品更新消息--->' . $data . '--->' . $date_time . "\n"); + Log::info('MQ收到消息[商品更新]--->' . $data . '--->' . $date_time . "\n"); // 如果是数字。则打印订单 $is_log = false; $curl_error = ''; diff --git a/app/command/SendMarkSms.php b/app/command/SendMarkSms.php index 69b573b..58f2992 100644 --- a/app/command/SendMarkSms.php +++ b/app/command/SendMarkSms.php @@ -65,7 +65,7 @@ class SendMarkSms extends Command $callback = function ($msg) use ($queue){ $date_time = date('Y-m-d H:i:s'); $data = $msg->body; - Log::info('收到消息--->' . $data . '--->' . $date_time . "\n"); + Log::info('MQ收到消息[发送营销短信]--->' . $data . '--->' . $date_time . "\n"); // 发给队列 Redis::send('send.mark.sms', $data); $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']); diff --git a/app/command/SendWechatTemp.php b/app/command/SendWechatTemp.php index 6d549e8..5d67e4c 100644 --- a/app/command/SendWechatTemp.php +++ b/app/command/SendWechatTemp.php @@ -65,7 +65,7 @@ class SendWechatTemp extends Command $callback = function ($msg) use ($queue){ $date_time = date('Y-m-d H:i:s'); $data = $msg->body; - Log::info('收到消息--->' . $data . '--->' . $date_time . "\n"); + Log::info('MQ收到消息[发送微信模版消息]--->' . $data . '--->' . $date_time . "\n"); // 发给队列 Redis::send('send.wechat.temp', $data); $msg->delivery_info['channel']->basic_ack($msg->delivery_info['delivery_tag']); diff --git a/app/queue/redis/ApplySmsTemp.php b/app/queue/redis/ApplySmsTemp.php index 445e0ef..dd37061 100644 --- a/app/queue/redis/ApplySmsTemp.php +++ b/app/queue/redis/ApplySmsTemp.php @@ -18,5 +18,10 @@ class ApplySmsTemp implements Consumer { Log::info('消息队列【申请新短信模版】接收到消息' . $data); + + + + + } } \ No newline at end of file diff --git a/app/queue/redis/BirthdayGiftSms.php b/app/queue/redis/BirthdayGiftSms.php index f2da2e1..dce69e1 100644 --- a/app/queue/redis/BirthdayGiftSms.php +++ b/app/queue/redis/BirthdayGiftSms.php @@ -17,5 +17,9 @@ class BirthdayGiftSms implements Consumer public function consume($data) { Log::info('消息队列【生日有礼】接收到消息' . $data); + + + + } } \ No newline at end of file diff --git a/app/queue/redis/SendMarkSms.php b/app/queue/redis/SendMarkSms.php index ba0a1e0..d3d3030 100644 --- a/app/queue/redis/SendMarkSms.php +++ b/app/queue/redis/SendMarkSms.php @@ -17,5 +17,10 @@ class SendMarkSms implements Consumer public function consume($data) { Log::info('消息队列【发送营销短信】接收到消息' . $data); + + + + + } } \ No newline at end of file diff --git a/app/queue/redis/SendWechatTemp.php b/app/queue/redis/SendWechatTemp.php index bc2cc11..7968dac 100644 --- a/app/queue/redis/SendWechatTemp.php +++ b/app/queue/redis/SendWechatTemp.php @@ -17,5 +17,11 @@ class SendWechatTemp implements Consumer public function consume($data) { Log::info('消息队列【发送微信模版消息】接收到消息' . $data); + + + + + + } } \ No newline at end of file diff --git a/start_webman_commands.php b/start_webman_commands.php new file mode 100644 index 0000000..35b9ffe --- /dev/null +++ b/start_webman_commands.php @@ -0,0 +1,45 @@ + $command) { + echo "执行第 " . ($index + 1) . " 条命令: {$command}\n"; + + // 执行命令 + $output = []; + $returnVar = 0; + exec($command, $output, $returnVar); + + // 检查命令执行结果 + if ($returnVar === 0) { + echo "命令执行成功\n"; + } else { + echo "命令执行失败,返回码: {$returnVar}\n"; + echo "输出信息: " . implode("\n", $output) . "\n"; + } +} + +echo "所有命令已提交执行\n"; \ No newline at end of file