RejectedPushJob.php 922 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Jobs;
  3. use Illuminate\Bus\Queueable;
  4. use Illuminate\Contracts\Queue\ShouldQueue;
  5. use Illuminate\Foundation\Bus\Dispatchable;
  6. use Illuminate\Queue\InteractsWithQueue;
  7. use Illuminate\Queue\SerializesModels;
  8. use Illuminate\Support\Facades\Http;
  9. class RejectedPushJob implements ShouldQueue
  10. {
  11. use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  12. public $tries = 5;
  13. public $timeout = 120;
  14. /**
  15. * [['推单任务号','退回单号','审核号','asn']]
  16. */
  17. private array $pushData;
  18. /**
  19. * @param array $pushData
  20. */
  21. public function __construct(array $pushData)
  22. {
  23. $this->pushData = $pushData;
  24. }
  25. /**
  26. * Execute the job.
  27. *
  28. * @return void
  29. */
  30. public function handle()
  31. {
  32. $url = config('api.java.wms.rejectedPushTask.receivePush');
  33. $response = Http::post($url, $this->pushData);
  34. }
  35. }