where('status', 'active') ->where('server_mode', 'production') ->get(); if ($members->isEmpty()) { Log::info('[SyncBarobill] 활성 회원 없음, 스킵'); return; } $yesterday = Carbon::yesterday()->format('Ymd'); $today = Carbon::today()->format('Ymd'); foreach ($members as $member) { try { if (in_array($this->syncType, ['all', 'bank'])) { $result = $bankSyncService->syncIfNeeded( $member->tenant_id, $yesterday, $today ); Log::info('[SyncBarobill] 은행 동기화 완료', [ 'tenant_id' => $member->tenant_id, 'result' => $result, ]); } if (in_array($this->syncType, ['all', 'card'])) { $result = $cardSyncService->syncCardTransactions( $member->tenant_id, $yesterday, $today ); Log::info('[SyncBarobill] 카드 동기화 완료', [ 'tenant_id' => $member->tenant_id, 'result' => $result, ]); } } catch (\Throwable $e) { Log::error('[SyncBarobill] 동기화 실패', [ 'tenant_id' => $member->tenant_id, 'sync_type' => $this->syncType, 'error' => $e->getMessage(), ]); } } } }