ImportProductImgJob.php 941 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\jobs\pospal;
  8. use yii\base\BaseObject;
  9. use yii\queue\JobInterface;
  10. use app\modules\admin\models\pospal\PospalForm;
  11. /**
  12. * 银豹同步商品图片
  13. */
  14. class ImportProductImgJob 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. $_GET['md_id'] = 0;
  24. echo '----executeImportProductImg----' . $this->store_id;
  25. $form = new PospalForm(['store_id' => $this->store_id, 'hostInfo' => $this->hostInfo]);
  26. $res = $form->importProductImg($this->pageNo, $this->okCount);
  27. echo '----executeImportProductImg--end--' . $this->store_id;
  28. echo json_encode($res);
  29. }
  30. }