Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
fa97a00
✨ feat: code formatting
leeedongjaee Aug 11, 2025
ecb0677
✨ feat: 최종 특약 수정, 삭제 요청 및 수락 구현
leeedongjaee Aug 11, 2025
474fe5e
✨ feat: 최종 특약 삭제 메서드 수정
leeedongjaee Aug 11, 2025
45f4d11
✨ feat: 최종 특약 수정, 삭제 Dto 구현
leeedongjaee Aug 11, 2025
242a53f
✨ feat: 계약 최종 특약 관련 메시지 AI 처리
leeedongjaee Aug 11, 2025
e09d548
Merge branch 'develop' of https://github.com/ITZEEP/backend into refa…
leeedongjaee Aug 11, 2025
8016f89
✨ feat: 매물 등록, 조회 Service 구현
leeedongjaee Aug 11, 2025
129c2d6
✨ feat: 매물 등록, 조회 Controller 구현
leeedongjaee Aug 11, 2025
921f4cf
✨ feat: 매물 등록, 조회 Dto 구현
leeedongjaee Aug 11, 2025
cebbf84
✨ feat: 매물 등록, 조회 VO 구현
leeedongjaee Aug 11, 2025
21bfcc2
✨ feat: 매물 등록, 조회 Mapper 구현
leeedongjaee Aug 11, 2025
4bfab61
✨ feat: 매물 등록/수정 DTO 구조 개선
MeongW Aug 12, 2025
b0986a0
🐛 fix: HomeMapper.xml 중복 쿼리 제거
MeongW Aug 12, 2025
64ce3d0
♻️ refactor: 매물 Controller 인터페이스와 구현부 분리
MeongW Aug 12, 2025
1390870
♻ refactor: 매물 Service 코드 정리 및 로깅 개선
MeongW Aug 12, 2025
9e0c538
♻ refactor: 매물 Service 인터페이스 이미지 업로드 지원 추가
MeongW Aug 12, 2025
f00258b
🐛 fix: ContractChatServiceImpl 코드 포맷팅 정리
MeongW Aug 12, 2025
50b13b1
🐛 fix: HomeResponseDto buildDate 타입 변환 수정
MeongW Aug 12, 2025
18ea69b
♻ refactor: HomeRegisterVO DTO 변환 로직 개선
MeongW Aug 12, 2025
f6cf1b5
✨ feat: ServletConfig에 LocalDate 컨버터 추가
MeongW Aug 12, 2025
f8a0cbd
🌱 chore: merge develop
MeongW Aug 12, 2025
f9d44eb
♻ refactor: home_detail에 area, land_category 추가
seonju21 Aug 12, 2025
2c02e07
♻ refactor: 매물 이미지 등록 api 수정
seonju21 Aug 12, 2025
d406ae9
♻ refactor: 매물 이미지 등록 api 수정
seonju21 Aug 12, 2025
ffbcc78
♻ refactor: 매물 이미지 등록 api 수정
seonju21 Aug 12, 2025
cf04320
♻ refactor: 매물 리스트에 home_floor 추가
seonju21 Aug 13, 2025
7361f17
♻ refactor: 매물 리스트에 home_floor 추가
seonju21 Aug 13, 2025
a5add29
♻ refactor: 매물리스트 페이지네이션
seonju21 Aug 14, 2025
0d6849f
♻ refactor: 매물리스트 페이지네이션
seonju21 Aug 14, 2025
4bc42d9
♻ refactor: 매물리스트 필터링
seonju21 Aug 14, 2025
df28b50
♻ refactor: 매물리스트 필터링
seonju21 Aug 14, 2025
237672e
♻ refactor: 매물리스트 필터링
seonju21 Aug 16, 2025
31cb4c9
🌱 chore: git merge
leeedongjaee Aug 17, 2025
6b2e7c9
✨ feat: 매물 조회 Mapper 메서드 추가
leeedongjaee Aug 17, 2025
1478e07
✨ feat: Home dto 삭제
leeedongjaee Aug 17, 2025
742e2d8
🌱 chore: git merge
leeedongjaee Aug 17, 2025
0979b4f
✨ feat: Home dto 삭제
leeedongjaee Aug 17, 2025
81a97dc
Merge branch 'refactor/homeCreate' of https://github.com/ITZEEP/backe…
seonju21 Aug 17, 2025
ed9a86e
♻ refactor: 매물 상세설명 추가
seonju21 Aug 17, 2025
feaa781
:bug: fix: conflict 해결
seonju21 Aug 17, 2025
4a8d212
♻ refactor: 매물 메인 페이지 chatCnt 추가
seonju21 Aug 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public class HomeControllerImpl implements HomeController {
public ResponseEntity<ApiResponse<Integer>> createHome(
@Valid @RequestPart HomeCreateRequestDto requestDto, Authentication authentication) {

// ✨ 매물 등록 요청 데이터와 description 값을 로그로 확인
log.info("매물 등록 요청 데이터: {}", requestDto);
log.info("컨트롤러에서 확인한 description 값: {}", requestDto.getDescription());

Comment on lines +45 to +48
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

PII 노출 위험: 요청 DTO 전체를 info 레벨로 로깅하지 마세요

주소 등 민감정보와 대용량 파일 메타가 로그에 남을 수 있습니다. debug로 내리고, 필요한 최소 필드만 구조화해 로그하세요.

적용 예시(diff):

-          // ✨ 매물 등록 요청 데이터와 description 값을 로그로 확인
-          log.info("매물 등록 요청 데이터: {}", requestDto);
-          log.info("컨트롤러에서 확인한 description 값: {}", requestDto.getDescription());
+          // 요청 핵심 메타만 디버그 로깅 (민감정보/대용량 제외)
+          log.debug("매물 등록 요청 수신: residenceType={}, leaseType={}, roomCnt={}, hasImages={}, hasDescription={}",
+                  requestDto.getResidenceType(),
+                  requestDto.getLeaseType(),
+                  requestDto.getRoomCnt(),
+                  requestDto.getImages() != null && !requestDto.getImages().isEmpty(),
+                  requestDto.getDescription() != null && !requestDto.getDescription().isBlank());

추가 제안(선택 라인 외, 가이드 준수): Swagger 엔드포인트 문서화

// import io.swagger.annotations.ApiOperation;
// import io.swagger.annotations.ApiResponses;
// import io.swagger.annotations.ApiResponse;

@ApiOperation(value = "매물 등록", notes = "이미지와 함께 매물을 등록합니다.")
@ApiResponses({
  @ApiResponse(code = 200, message = "성공"),
  @ApiResponse(code = 400, message = "유효성 검증 실패"),
  @ApiResponse(code = 401, message = "인증 실패")
})
@PostMapping(consumes = "multipart/form-data")
public ResponseEntity<ApiResponse<Integer>> createHome(...)

추가 제안(선택 라인 외, 가이드 준수 — 선택): 목록/검색 응답도 ApiResponse로 일원화

return ResponseEntity.ok(ApiResponse.success(PageResponse.of(homes, pageRequest, totalCount)));

원하시면 일괄 변경 패치도 도와드릴게요.

🤖 Prompt for AI Agents
In src/main/java/org/scoula/domain/home/controller/HomeControllerImpl.java
around lines 45-48, avoid logging the entire request DTO at INFO (PII risk);
change the first log to debug and stop printing the full DTO, and instead log
only a few non-sensitive structured fields (e.g., userId, title, description
length/preview) at DEBUG or INFO as appropriate; replace the second line that
logs description directly with a safer, minimal field log (e.g., description
length or first N chars) and ensure logs never include addresses, full file
metadata, or other sensitive fields.

Integer userId = getCurrentUserId(authentication);

// 이미지 파일 리스트 처리
Expand Down Expand Up @@ -70,6 +74,7 @@ public ResponseEntity<ApiResponse<Integer>> createHome(
.isPet(requestDto.getIsPet())
.isParking(requestDto.getIsParking())
.facilityItemIds(requestDto.getFacilityItemIds())
.description(requestDto.getDescription())
.maintenanceFees(
requestDto.getMaintenanceFees() != null
? requestDto.getMaintenanceFees().stream()
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/scoula/domain/home/dto/HomeCreateDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public class HomeCreateDTO {

private List<MaintenanceFeeDTO> maintenanceFees;

private String description;

@Data
@NoArgsConstructor
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public class HomeCreateRequestDto {
@ApiModelProperty(value = "매물 이미지 목록")
private List<MultipartFile> images;

@ApiModelProperty(value = "상세 정보", example = "남향이라 햇살이 잘 들고, 근처에 공원이 있어 산책하기 좋습니다.")
private String description;

@ApiModel(description = "관리비 항목 DTO")
@Data
@NoArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class HomeResponseDTO {
private Boolean isParking;

private List<FacilityItem> facilities;

private String description;
private List<HomeMaintenanceFeeVO> maintenanceFees;

private List<String> imageUrls;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public Integer createHome(HomeCreateDTO createDTO, List<MultipartFile> images, I
createDTO.getResidenceType(),
images != null ? images.size() : 0);

// ✨ 서비스에서 받은 DTO와 description 값 확인
log.info("서비스에서 받은 DTO: {}", createDTO);
log.info("서비스에서 확인한 description 값: {}", createDTO.getDescription());

try {
HomeVO home =
HomeVO.builder()
Expand Down Expand Up @@ -79,8 +83,13 @@ public Integer createHome(HomeCreateDTO createDTO, List<MultipartFile> images, I
.isParking(createDTO.getIsParking())
.area(createDTO.getArea())
.landCategory(createDTO.getLandCategory())
.description(createDTO.getDescription())
.build();

// ✨ DB에 저장할 객체의 description 값 최종 확인
log.info("DB에 저장할 HomeDetailVO 객체: {}", homeDetail);
log.info("최종 DB 저장 직전의 description 값: {}", homeDetail.getDescription());

int detailResult = homeMapper.insertHomeDetail(homeDetail);
if (detailResult != 1) {
throw new BusinessException(
Expand Down Expand Up @@ -158,7 +167,11 @@ public Integer createHome(HomeCreateDTO createDTO, List<MultipartFile> images, I
return homeId;

} catch (Exception e) {
log.error("매물 등록 중 오류 발생: userId={}, error={}", userId, e.getMessage());
log.error(
"매물 등록 중 오류 발생: userId={}, error={}",
userId,
e.getMessage(),
e); // ⭐️ 예외 객체(e)를 함께 출력하여 스택 트레이스 확인
throw new BusinessException(
CommonErrorCode.INTERNAL_SERVER_ERROR, "매물 등록 중 오류가 발생했습니다: " + e.getMessage());
}
Expand Down Expand Up @@ -188,6 +201,12 @@ public HomeResponseDTO getHome(Integer homeId) {

HomeDetailVO homeDetail = homeMapper.selectHomeDetailByHomeId(homeId);

// ✨ 매퍼에서 반환된 객체와 description 값 확인
log.info("매퍼에서 반환된 HomeDetailVO: {}", homeDetail);
log.info(
"매퍼에서 확인한 description 값: {}",
homeDetail != null ? homeDetail.getDescription() : null);

List<HomeImageVO> images = homeMapper.selectHomeImagesByHomeId(homeId);
List<String> imageUrls =
images.stream().map(HomeImageVO::getImageUrl).collect(Collectors.toList());
Expand Down Expand Up @@ -229,6 +248,7 @@ public HomeResponseDTO getHome(Integer homeId) {
.isParking(homeDetail != null ? homeDetail.getIsParking() : null)
.facilities(facilities)
.maintenanceFees(maintenanceFees)
.description(homeDetail != null ? homeDetail.getDescription() : null)
.imageUrls(imageUrls)
.createdAt(home.getCreatedAt())
.updatedAt(home.getUpdatedAt())
Expand Down Expand Up @@ -262,6 +282,7 @@ public List<HomeResponseDTO> searchHomes(HomeSearchDTO searchDTO) {
.viewCnt(home.getViewCnt())
.likeCnt(home.getLikeCnt())
.roomCnt(home.getRoomCnt())
.chatCnt(home.getChatCnt())
.supplyArea(home.getSupplyArea())
.imageUrls(
mainImageUrl != null
Expand Down Expand Up @@ -297,6 +318,7 @@ public List<HomeResponseDTO> getHomeList(int page, int size) {
.homeStatus(home.getHomeStatus())
.viewCnt(home.getViewCnt())
.likeCnt(home.getLikeCnt())
.chatCnt(home.getChatCnt())
.roomCnt(home.getRoomCnt())
.supplyArea(home.getSupplyArea())
.exclusiveArea(home.getExclusiveArea())
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/scoula/domain/home/vo/HomeDetailVO.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ public class HomeDetailVO {
private Boolean isParking;
private Float area;
private String landCategory;
private String description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
<insert id="insertHomeDetail" parameterType="org.scoula.domain.home.vo.HomeDetailVO" useGeneratedKeys="true" keyProperty="homeDetailId">
INSERT INTO home_detail (
home_id, build_date, home_floor, building_total_floors,
home_direction, bathroom_count, is_pet, is_parking_available,area,land_category
home_direction, bathroom_count, is_pet, is_parking_available,area,land_category,description

) VALUES (
#{homeId}, #{buildDate}, #{homeFloor}, #{buildingTotalFloors},
#{homeDirection}, #{bathroomCnt}, #{isPet}, #{isParking}, #{area}, #{landCategory}
#{homeDirection}, #{bathroomCnt}, #{isPet}, #{isParking}, #{area}, #{landCategory},#{description}
)
</insert>

Expand Down Expand Up @@ -63,7 +63,7 @@
<select id="selectHomeDetailByHomeId" parameterType="int" resultType="org.scoula.domain.home.vo.HomeDetailVO">
SELECT
home_detail_id, home_id, build_date, home_floor, building_total_floors,
home_direction, bathroom_count as bathroomCnt, is_pet as isPet, is_parking_available as isParking
home_direction, bathroom_count as bathroomCnt, is_pet as isPet, is_parking_available as isParking, description as description
FROM home_detail
WHERE home_id = #{homeId}
</select>
Expand Down
Loading