PospalJob.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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\pospal\PospalForm;
  11. /**
  12. * 银豹同步商品图片
  13. */
  14. class PospalJob extends BaseObject implements JobInterface
  15. {
  16. public $store_id;
  17. public $in_action;
  18. public $hostInfo;
  19. public $pageNo = 0;
  20. public $okCount = 0;
  21. public function execute($queue)
  22. {
  23. debug_log(__METHOD__ . '~~~~~~~~已弃用~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
  24. throw new \Exception(__METHOD__ . '~~~~~~~~已弃用~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
  25. return;
  26. $_GET['md_id'] = 0;
  27. if($this->in_action){
  28. $action = $this->in_action;
  29. $this->$action();
  30. }
  31. }
  32. public function executeImportProductImg() {
  33. echo '----executeImportProductImg----' . $this->store_id;
  34. $form = new PospalForm(['store_id' => $this->store_id, 'hostInfo' => $this->hostInfo]);
  35. $res = $form->importProductImg($this->pageNo, $this->okCount);
  36. echo '----executeImportProductImg--end--' . $this->store_id;
  37. echo json_encode($res);
  38. }
  39. }