수정
This commit is contained in:
@@ -59,19 +59,33 @@ class NaverService
|
||||
$vType = $rawData['verificationTypeCode'] ?? '';
|
||||
|
||||
// 2. 원본 데이터 Staging 저장
|
||||
$this->rawStagingModel->insert([
|
||||
$insertResult = $this->rawStagingModel->insert([
|
||||
'atcl_no' => $articleNumber,
|
||||
'verification_type' => $vType,
|
||||
'request_type' => $requestType,
|
||||
'raw_json' => $rawData
|
||||
]);
|
||||
|
||||
if (!$insertResult) {
|
||||
$dbError = $this->db->error();
|
||||
write_custom_log("naver_raw_staging Insert 실패 | Atcl: $articleNumber | Error: " . json_encode($dbError), 'ERROR', 'service');
|
||||
throw new Exception("naver_raw_staging 저장 실패: " . json_encode($dbError));
|
||||
}
|
||||
|
||||
CLI::write(CLI::color('🟢 임시테이블 저장 완료', 'green'));
|
||||
|
||||
// 3. 타입별 분기 처리
|
||||
CLI::write(CLI::color("🔵 검증타입 확인: vType = $vType", 'cyan'));
|
||||
write_custom_log("타입별 분기 | Atcl: $articleNumber | vType: $vType | requestType: $requestType", 'INFO', 'service');
|
||||
|
||||
if ($vType === 'S' || $vType === 'S_VR') {
|
||||
CLI::write(CLI::color('🟢 Type S Handler 호출', 'green'));
|
||||
return $this->typeSHandler->handle($articleNumber, $rawData, $payload);
|
||||
} else {
|
||||
return $this->typeV2Handler->handle($articleNumber, $rawData, $payload);
|
||||
CLI::write(CLI::color('🟢 Type V2 Handler 호출', 'green'));
|
||||
$result = $this->typeV2Handler->handle($articleNumber, $rawData, $payload);
|
||||
write_custom_log("TypeV2Handler 완료 | Atcl: $articleNumber | Result: $result", 'INFO', 'service');
|
||||
return $result;
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user