SyncOrderPackageLogisticRouteTask.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace App\Console\Commands;
  3. use App\Services\LogService;
  4. use App\Services\OrderPackageReceivedSyncService;
  5. use Illuminate\Console\Command;
  6. class SyncOrderPackageLogisticRouteTask extends Command
  7. {
  8. /**
  9. * @var OrderPackageReceivedSyncService $service
  10. */
  11. public $service;
  12. /**
  13. * The name and signature of the console command.
  14. *
  15. * @var string
  16. */
  17. protected $signature = 'syncOrderPackageLogisticRouteTask';
  18. /**
  19. * The console command description.
  20. *
  21. * @var string
  22. */
  23. protected $description = 'Command description';
  24. /**
  25. * Create a new command instance.
  26. *
  27. * @return void
  28. */
  29. public function __construct()
  30. {
  31. parent::__construct();
  32. }
  33. /**
  34. * Execute the console command.
  35. *
  36. * @throws \Exception
  37. */
  38. public function handle()
  39. {
  40. LogService::log(SyncOrderPackageLogisticRouteTask::class, "同步快递信息定时任务启动", '');
  41. ini_set('memory_limit', '2226M');
  42. $this->service = app('OrderPackageReceivedSyncService');
  43. $this->service->syncLogisticRouteYTO();
  44. $this->service->syncLogisticRouteByAliJiSu();
  45. $this->service->syncLogisticRoute();
  46. }
  47. }