| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\queue\redis\fast;
- use app\extra\life\data\Store;
- use Webman\RedisQueue\Consumer;
- class SyncOrder implements Consumer
- {
- /**
- * 消费队列名
- * 队列获取线索订单
- * @var string
- */
- public string $queue = "order-sync";
- /**
- * 连接配置
- * @var string
- */
- public string $connection = "default";
- protected array $component_event_type_tags = [
- "2" => "表单提交",
- "17" => "智能电话_确认接通",
- "40" => "无效事件",
- "192" => "私信留资",
- "194" => "确认意向",
- "195" => "加为好友",
- "196" => "预付定金",
- "285" => "正价支付",
- "386" => "微信_添加企业微信",
- "527" => "到店",
- "536" => "团购留资",
- "537" => "私信意向",
- ];
- public function consume($data): bool
- {
- try {
- $config = sConf('life.');
- $result = (new Store)->config($config)->token()->asyncClue($config['account']);
- } catch (\Throwable $throwable) {
- echo getDateFull()."==获取线索订单失败\n";
- echo $throwable->getMessage()."\n";
- echo $throwable->getFile()."【".$throwable->getLine()."】\n";
- }
- return true;
- }
- }
|