PushMemberTagJob.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Name: 芸众商城系统
  5. * Author: 广州市芸众信息科技有限公司
  6. * Profile: 广州市芸众信息科技有限公司位于国际商贸中心的广州,专注于移动电子商务生态系统打造,拥有芸众社交电商系统、区块链数字资产管理系统、供应链管理系统、电子合同等产品/服务。官网 :www.yunzmall.com www.yunzshop.com
  7. * Date: 2021/9/22
  8. * Time: 13:37
  9. */
  10. namespace business\common\job;
  11. use app\common\facades\Setting;
  12. use business\common\services\customers\ShopTagRefreshService;
  13. use business\common\services\DepartmentService;
  14. use Illuminate\Bus\Queueable;
  15. use Illuminate\Contracts\Queue\ShouldQueue;
  16. use Illuminate\Queue\InteractsWithQueue;
  17. use Illuminate\Queue\SerializesModels;
  18. class PushMemberTagJob implements ShouldQueue
  19. {
  20. use InteractsWithQueue, Queueable, SerializesModels;
  21. protected $business_id;
  22. protected $uniacid;
  23. protected $uids;
  24. public function __construct($uniacid, $business_id, $uids)
  25. {
  26. $this->uniacid = $uniacid;
  27. $this->business_id = $business_id;
  28. $this->uids = $uids;
  29. }
  30. /**
  31. * Execute the job.
  32. *
  33. * @return void
  34. */
  35. public function handle()
  36. {
  37. \YunShop::app()->uniacid = $this->uniacid;
  38. Setting::$uniqueAccountId = $this->uniacid;
  39. \Log::debug("用户标签推送队列开始_{$this->business_id}", $this->uids);
  40. (new ShopTagRefreshService($this->business_id))->connectShopTagMemberToWechat($this->uids);
  41. \Log::debug("用户标签推送队列结束_{$this->business_id}", $this->uids);
  42. }
  43. }