MochatJob.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\jobs;
  8. use yii\base\BaseObject;
  9. use yii\queue\JobInterface;
  10. use app\modules\admin\models\wechat_mp\CardForm;
  11. use app\modules\admin\models\mochat\MochatForm;
  12. /**
  13. * scrm
  14. */
  15. class MochatJob extends BaseObject implements JobInterface
  16. {
  17. public $id;
  18. public $in_action;
  19. public $start_id = 0;
  20. public $count = 1;
  21. public $upType = 0;
  22. public $store_id;
  23. public $type;
  24. public $saas_user_id;
  25. public $extData;
  26. public $queue_time;
  27. public function execute($queue)
  28. {
  29. debug_log(__METHOD__ . '~~~~~~~~已弃用~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
  30. throw new \Exception(__METHOD__ . '~~~~~~~~已弃用~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
  31. return;
  32. $_GET['md_id'] = 0;
  33. if($this->in_action){
  34. $action = $this->in_action;
  35. $this->$action();
  36. }
  37. }
  38. public function executeSendMsg() {
  39. $v = microtime(true);
  40. echo '----executeSendMsg----' . $v;
  41. var_dump($this);
  42. $res = MochatForm::sendMsg($this->queue_time, $this->store_id, $this->type, $this->saas_user_id, $this->extData);
  43. echo '----executeSendMsg--end--' . $v;
  44. echo json_encode($res);
  45. }
  46. }