syncRefundApplyStatus.php 755 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Console\Commands;
  3. use App\DataApi\Helper\RefundApplyHelper;
  4. use Illuminate\Support\Facades\Log;
  5. class syncRefundApplyStatus extends \Illuminate\Console\Command
  6. {
  7. protected $signature = "refund_apply_status:sync";
  8. protected $description = 'refund_apply_status sync';
  9. public function __construct()
  10. {
  11. parent::__construct();
  12. }
  13. public function handle()
  14. {
  15. $RefundApplyHelper = new RefundApplyHelper;
  16. $RefundApplyHelper->syncRefundApplyStatus();
  17. Log::info('同步返费申请状态成功,请等待下次更新');
  18. $i = 0;
  19. //半小时同步一次
  20. while ($i < 600) {
  21. sleep(1);
  22. $i++;
  23. }
  24. $this->handle();
  25. }
  26. }