Files
wh-api/app/Amqp/Consumer/AliSlsConsumer.php
ykxiao 0b2299c427
Some checks failed
Build Docker / build (push) Has been cancelled
协程版仓库后端项目
2025-07-08 14:59:47 +08:00

35 lines
829 B
PHP

<?php
declare(strict_types=1);
namespace App\Amqp\Consumer;
use App\Service\AliLogsSignService;
use Hyperf\Amqp\Result;
use Hyperf\Amqp\Annotation\Consumer;
use Hyperf\Di\Annotation\Inject;
/**
* Author: ykxiao
* Date: 2025/6/3
* Time: 下午7:18
* Description: 阿里日志消费.
*
* (c) ykxiao <yk_9001@hotmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
#[Consumer(exchange: 'wh_ali_sls', routingKey: 'wh_ali_sls_key', queue: 'wh_ali_sls_queue', name: "AliSlsConsumer", nums: 5)]
class AliSlsConsumer extends BaseConsumer
{
#[Inject]
protected AliLogsSignService $aliLogsSignService;
public function handle($data): Result
{
$this->aliLogsSignService->putWebTracking($data);
return Result::ACK;
}
}