You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
911 B

  1. <?php
  2. namespace App\Service;
  3. interface MqttServiceInterface
  4. {
  5. /**
  6. * 发布给商户
  7. * @return mixed
  8. */
  9. public function speakToStore($orderId, $isMain = true);
  10. /**
  11. * MQTT发布消息
  12. * @param $message
  13. * @param $topic
  14. * @param $toClientId
  15. * @return mixed
  16. */
  17. public function pubToMqtt($message, $topic, $toClientId);
  18. /**
  19. * @param string|number $message 消息内容
  20. * @param string $topic 发布消息到主题,主题名
  21. * @param string $type 消息类型,cash或tts
  22. * @param string $payId 支付方式,如“支付宝”、“微信”等
  23. * @param string $toClientId 终端id,如IMEI码
  24. * @param string $curClientId 当前客户端id
  25. */
  26. public function publish(
  27. $message,
  28. $topic,
  29. $toClientId = '',
  30. $type = '',
  31. $payId = '',
  32. $curClientId = ''
  33. );
  34. }