| 1234567891011121314151617181920 |
- <?php
- namespace App\Console\Commands;
- use App\Services\Agent\AgentProfitLedgerService;
- use Illuminate\Console\Command;
- class AgentProfitSync extends Command
- {
- protected $signature = 'agent:profit-sync';
- protected $description = '按已结算注单实时计算合营代理分成(更新实时保证金)';
- public function handle(AgentProfitLedgerService $ledger): int
- {
- $result = $ledger->sync();
- $this->info(json_encode($result, JSON_UNESCAPED_UNICODE));
- return $result['failed'] === 0 ? self::SUCCESS : self::FAILURE;
- }
- }
|