워커 수정

This commit is contained in:
2026-04-27 15:03:36 +09:00
parent b0ec75ae56
commit f8c26acea8
30 changed files with 1317 additions and 1142 deletions

View File

@@ -4,16 +4,19 @@ namespace App\Controllers\Common;
use App\Controllers\BaseController;
use App\Models\common\CommonModel;
use App\Models\manage\UserModel;
use App\Libraries\NaverApiClient;
class Common extends BaseController
{
private $model;
private $userModel;
private $naverApiClient;
public function __construct()
{
$this->model = new CommonModel();
$this->userModel = new UserModel();
$this->naverApiClient = new NaverApiClient();
}
public function getVrfcCode()
@@ -118,4 +121,54 @@ class Common extends BaseController
]);
}
}
// 단지 조회
public function getComplexList()
{
$legalDivisionNumber = $this->request->getGet("legalDivisionNumber");
$realEstateType = $this->request->getGet("realEstateType") ?? null;
try {
$complexList = $this->naverApiClient->getComplexList($legalDivisionNumber , $realEstateType);
return $this->response->setJSON($complexList);
} catch (\Exception $e) {
return $this->response->setJSON([
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
/**
* 평형 조회
*
* complexNumber : 단지 번호
* realEstateType : 매물 종류 (APT, OFFICETEL, VILLA 등)
*/
public function getPyeongInfo()
{
$complexNumber = $this->request->getGet("complexNumber");
$realEstateType = $this->request->getGet("realEstateType");
try {
if ( $realEstateType == 'A01' || $realEstateType == 'A02' || $realEstateType == 'A03' ) {
$pyeongInfo = $this->naverApiClient->getPyeongTypeList($complexNumber);
} else if ( $realEstateType == 'A05' || $realEstateType == 'A06' ) {
$pyeongInfo = $this->naverApiClient->getVillaPyeongTypeList($complexNumber);
} else {
return $this->response->setJSON([
'code' => '9',
'msg' => '지원하지 않는 매물 종류입니다.',
]);
}
return $this->response->setJSON($pyeongInfo);
} catch (\Exception $e) {
return $this->response->setJSON([
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
}