Description 📌 설명
“진단하기” 버튼 클릭 시, 한 번의 API 호출로 아래 데이터를 모두 반환하도록 합성 API를 구현한다.
위험도 요약 (게이지 점수, 등급, 핵심 위험 요인)
임대인 기본 정보
임대인 신뢰도
임대인 소유 매물 목록
기존에 각각의 조회 API를 따로 만드는 대신, 합성 API(POST /api/diagnosis)를 제공하여 프론트에서 효율적으로 한 번에 화면을 구성할 수 있게 한다.
✅ 할 일 (Todo)
DiagnosisRequestDTO 생성 (주소, 상세주소, 주택유형, 전세금)
DiagnosisResponseDTO 및 하위 DTO들 정의 (RiskSummaryDTO, LandlordCardDTO, LandlordTrustDTO, PlaceSimpleDTO)
DiagnosisController 작성 (POST /api/diagnosis)
DiagnosisService 구현 (Place, Risk, Landlord, LandlordTrust 등 조합)
PlaceRepository, RiskRepository, LandlordRepository, LandlordTrustRepository 메서드 정의
위험 점수 계산 로직(정규화, 등급 산출, 핵심 요인 백분율)
신뢰도 최신 스냅샷 조회 및 등급 매핑 로직
소유 매물 목록(최신순 Top N) 조회 로직
통합 응답 조립 및 반환
단위 테스트 및 통합 테스트 작성
📂 참고
API 엔드포인트: POST /api/diagnosis
요청 필드: address, addressDetail, houseType, deposit
응답 구조: DiagnosisResponseDTO (riskSummary, landlord, landlordTrust, landlordPlaces)
DB 엔티티: Place, Risk, Landlord, LandlordTrust
Reactions are currently unavailable
You can’t perform that action at this time.
📌 설명
“진단하기” 버튼 클릭 시, 한 번의 API 호출로 아래 데이터를 모두 반환하도록 합성 API를 구현한다.
기존에 각각의 조회 API를 따로 만드는 대신, 합성 API(
POST /api/diagnosis)를 제공하여 프론트에서 효율적으로 한 번에 화면을 구성할 수 있게 한다.✅ 할 일 (Todo)
DiagnosisRequestDTO생성 (주소, 상세주소, 주택유형, 전세금)DiagnosisResponseDTO및 하위 DTO들 정의 (RiskSummaryDTO, LandlordCardDTO, LandlordTrustDTO, PlaceSimpleDTO)DiagnosisController작성 (POST /api/diagnosis)DiagnosisService구현 (Place, Risk, Landlord, LandlordTrust 등 조합)PlaceRepository,RiskRepository,LandlordRepository,LandlordTrustRepository메서드 정의📂 참고
POST /api/diagnosisaddress, addressDetail, houseType, depositDiagnosisResponseDTO(riskSummary, landlord, landlordTrust, landlordPlaces)Place,Risk,Landlord,LandlordTrust