naverWorker 오류 수정
This commit is contained in:
@@ -33,8 +33,11 @@ class NaverWorker extends BaseCommand
|
||||
if ($result) {
|
||||
$rawData = $result[1];
|
||||
try {
|
||||
$payload = json_decode($rawData, true);
|
||||
|
||||
$responseJson = json_decode($rawData, true);
|
||||
$payload = $responseJson['request_data'] ?? [];
|
||||
if ( empty($payload) ) {
|
||||
throw new \Exception( date("Y-m-d H:i:s") . "::빈 페이로드 데이터: " . $rawData);
|
||||
}
|
||||
CLI::write("Processing: " . json_encode($payload, JSON_UNESCAPED_UNICODE));
|
||||
|
||||
$requestType = $payload['requestType'] ?? '';
|
||||
@@ -51,6 +54,7 @@ class NaverWorker extends BaseCommand
|
||||
switch ($requestType) {
|
||||
case 'REG':
|
||||
$this->insertVrfc($payload);
|
||||
break;
|
||||
case 'MOD':
|
||||
// 수동검증요청 및 매물정보수정 처리
|
||||
break;
|
||||
@@ -85,7 +89,7 @@ class NaverWorker extends BaseCommand
|
||||
private function insertVrfc($payload)
|
||||
{
|
||||
// 1. 필수 데이터 검증
|
||||
if (empty($payload['articleNumber']) || empty($payload['reqeustType'])) {
|
||||
if (empty($payload['articleNumber']) || empty($payload['requestType'])) {
|
||||
throw new \Exception("필수 파라미터 누락");
|
||||
}
|
||||
|
||||
@@ -101,10 +105,13 @@ class NaverWorker extends BaseCommand
|
||||
if (!$articleInfojson || !isset($articleInfojson['data']) || empty($articleInfojson['code'] !== 'success')) {
|
||||
throw new \Exception("매물 정보 조회 실패: $articleNumber ::: message : " . ($articleInfojson['message'] ?? 'No response'));
|
||||
}
|
||||
|
||||
$articleInfo = $articleInfojson['data'];
|
||||
|
||||
// 받아온 정보 로그 기록
|
||||
write_custom_log("ARTICLE_INFO | ArticleNumber: $articleNumber | Info: " . json_encode($articleInfo , JSON_UNESCAPED_UNICODE), 'INFO', 'service');
|
||||
CLI::write("Fetched Article Info: " . json_encode($articleInfo));
|
||||
$articleInfo = $articleInfojson['data'];
|
||||
|
||||
/**
|
||||
* $articleInfo['verificationTypeCode']
|
||||
* S : 현장확인매물
|
||||
|
||||
Reference in New Issue
Block a user