AgentRechargeSync.php 613 B

1234567891011121314151617181920
  1. <?php
  2. namespace App\Console\Commands;
  3. use App\Services\Agent\AgentRechargeService;
  4. use Illuminate\Console\Command;
  5. class AgentRechargeSync extends Command
  6. {
  7. protected $signature = 'agent:recharge-sync {agent_id? : 指定代理ID,补查该代理的链上充值}';
  8. protected $description = '同步并确认代理 USDT 自动充值';
  9. public function handle(AgentRechargeService $recharges): int
  10. {
  11. $agentId = $this->argument('agent_id');
  12. $this->info(json_encode($recharges->sync($agentId ? (int) $agentId : null), JSON_UNESCAPED_UNICODE));
  13. return self::SUCCESS;
  14. }
  15. }