SyncOrder.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace app\queue\redis\fast;
  3. use app\extra\life\data\Store;
  4. use Webman\RedisQueue\Consumer;
  5. class SyncOrder implements Consumer
  6. {
  7. /**
  8. * 消费队列名
  9. * 队列获取线索订单
  10. * @var string
  11. */
  12. public string $queue = "order-sync";
  13. /**
  14. * 连接配置
  15. * @var string
  16. */
  17. public string $connection = "default";
  18. protected array $component_event_type_tags = [
  19. "2" => "表单提交",
  20. "17" => "智能电话_确认接通",
  21. "40" => "无效事件",
  22. "192" => "私信留资",
  23. "194" => "确认意向",
  24. "195" => "加为好友",
  25. "196" => "预付定金",
  26. "285" => "正价支付",
  27. "386" => "微信_添加企业微信",
  28. "527" => "到店",
  29. "536" => "团购留资",
  30. "537" => "私信意向",
  31. ];
  32. public function consume($data): bool
  33. {
  34. try {
  35. $config = sConf('life.');
  36. $result = (new Store)->config($config)->token()->asyncClue($config['account']);
  37. } catch (\Throwable $throwable) {
  38. echo getDateFull()."==获取线索订单失败\n";
  39. echo $throwable->getMessage()."\n";
  40. echo $throwable->getFile()."【".$throwable->getLine()."】\n";
  41. }
  42. return true;
  43. }
  44. }