EachLikeReportJob.php 1015 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace App\Jobs\GrowingIO;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Queue\SerializesModels;
  5. use Illuminate\Queue\InteractsWithQueue;
  6. use Illuminate\Contracts\Queue\ShouldQueue;
  7. use Illuminate\Foundation\Bus\Dispatchable;
  8. class EachLikeReportJob extends BaseReportJob implements ShouldQueue
  9. {
  10. use Dispatchable;
  11. use InteractsWithQueue;
  12. use Queueable;
  13. use SerializesModels;
  14. protected $uid;
  15. protected $like_uid;
  16. protected $is_like_each;
  17. /**
  18. * Create a new job instance.
  19. *
  20. * @return void
  21. */
  22. public function __construct($uid, $like_uid, $is_like_each)
  23. {
  24. $this->uid = $uid;
  25. $this->like_uid = $like_uid;
  26. $this->is_like_each = $is_like_each;
  27. }
  28. /**
  29. * Execute the job.
  30. *
  31. * @return void
  32. */
  33. public function doHandle()
  34. {
  35. $this->doReport(self::EACH_LIKE, $this->uid, [
  36. 'related_id' => $this->like_uid,
  37. 'like_each' => $this->is_like_each,
  38. ]);
  39. }
  40. }