增加基础配置
Some checks failed
Build Docker / build (push) Has been cancelled

This commit is contained in:
2025-07-12 11:59:33 +08:00
parent fb50096e66
commit 8a3ab17b25
44 changed files with 1599 additions and 66 deletions

View File

@ -15,6 +15,7 @@ declare(strict_types=1);
namespace App\Amqp\Producer;
use App\Context\ApiUrlContext;
use App\Context\UserContext;
use Hyperf\Amqp\Message\ProducerMessage;
@ -38,6 +39,10 @@ abstract class BaseProducer extends ProducerMessage
$data['user'] = UserContext::getCurrentUser();
}
if (ApiUrlContext::hasApiUrl()) {
$data['api_url'] = ApiUrlContext::getApiUrl();
}
$this->payload = $data;
$this->properties['delivery_mode'] = 2; // 消息持久化
}