diff --git a/app/Services/NaverService.php b/app/Services/NaverService.php index 725282b..d10ea11 100644 --- a/app/Services/NaverService.php +++ b/app/Services/NaverService.php @@ -50,6 +50,14 @@ class NaverService */ public function processArticle(array $payload) { + // 🟢 방어 코드: null이면 여기서라도 할당 + if ($this->rawStagingModel === null) { + $this->rawStagingModel = new \App\Models\Entities\NaverRawStagingModel(); + } + if ($this->naverClient === null) { + $this->naverClient = new \App\Libraries\NaverApiClient(); + } + $articleNumber = $payload['articleNumber']; $requestType = $payload['requestType'] ?? ''; @@ -63,6 +71,8 @@ class NaverService $rawData = $response['data']; $vType = $rawData['verificationTypeCode'] ?? ''; + + // 2. [Staging] 원본 DB 저장 (JSON 타입 컬럼 활용) $this->rawStagingModel->insert([ 'atcl_no' => $articleNumber,