updateCouponQueueJob.php 804 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\Jobs;
  3. use app\common\models\GoodsCouponQueue;
  4. use Illuminate\Bus\Queueable;
  5. use Illuminate\Queue\SerializesModels;
  6. use Illuminate\Queue\InteractsWithQueue;
  7. use Illuminate\Contracts\Queue\ShouldQueue;
  8. class updateCouponQueueJob implements ShouldQueue
  9. {
  10. use InteractsWithQueue, Queueable, SerializesModels;
  11. protected $condition;
  12. protected $updatedData;
  13. /**
  14. * Create a new job instance.
  15. *
  16. * @return void
  17. */
  18. public function __construct($condition, $updatedData)
  19. {
  20. $this->condition = $condition;
  21. $this->updatedData = $updatedData;
  22. }
  23. /**
  24. * Execute the job.
  25. *
  26. * @return void
  27. */
  28. public function handle()
  29. {
  30. GoodsCouponQueue::updatedData($this->condition, $this->updatedData);
  31. }
  32. }