AppPushJob.php 886 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace common\queues;
  3. use Yii;
  4. use yii\base\BaseObject;
  5. use common\models\member\Auth;
  6. /**
  7. * app 推送
  8. *
  9. * Class AppPushJob
  10. * @package common\queues
  11. * @author jianyan74 <751393839@qq.com>
  12. */
  13. class AppPushJob extends BaseObject implements \yii\queue\JobInterface
  14. {
  15. /**
  16. * @var array
  17. */
  18. public $title;
  19. /**
  20. * @var array
  21. */
  22. public $content;
  23. /**
  24. * @var array
  25. */
  26. public $type;
  27. /**
  28. * @var Auth
  29. */
  30. public $auth;
  31. /**
  32. * @var array
  33. */
  34. public $transmissionContent = [];
  35. /**
  36. * @param \yii\queue\Queue $queue
  37. * @return mixed|void
  38. * @throws \yii\base\InvalidConfigException
  39. */
  40. public function execute($queue)
  41. {
  42. Yii::$app->services->extendAppPush->realPlus($this->type, $this->title, $this->content, $this->auth, $this->transmissionContent);
  43. }
  44. }
粤ICP备19079148号