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