@@ -60,16 +60,16 @@ class HouseServiceImpl(
60
60
// (2) null 데이터 blank로 변경
61
61
val tmpReq = changeNullToBlank(req)
62
62
// (3) 임시저장 데이터 생성
63
- val address = Address (tmpReq.city!! , tmpReq.detail!! , tmpReq.zipCode!! )
63
+ val address = Address (tmpReq.city!! , tmpReq.detail, tmpReq.zipCode!! )
64
64
val content = getContent(tmpReq.code!! )
65
65
val tmp = House (
66
66
tmpReq.agentDetail,
67
67
tmpReq.houseType,
68
68
tmpReq.rentalType!! ,
69
69
address,
70
70
tmpReq.size!! ,
71
- tmpReq.purpose!! ,
72
- tmpReq.floorNum!! ,
71
+ tmpReq.purpose,
72
+ tmpReq.floorNum,
73
73
tmpReq.contact!! ,
74
74
tmpReq.createdDate!! ,
75
75
tmpReq.price!! ,
@@ -97,7 +97,7 @@ class HouseServiceImpl(
97
97
// (1) 유효성 검사
98
98
if (validationReqDto(req)) {
99
99
// (2) 게시글 생성
100
- val address = Address (req.city!! , req.detail!! , req.zipCode!! )
100
+ val address = Address (req.city!! , req.detail, req.zipCode!! )
101
101
val content = getContent(req.code!! )
102
102
val house = House (
103
103
req.agentDetail,
@@ -178,7 +178,7 @@ class HouseServiceImpl(
178
178
val house = houseRepository.findByIdOrThrow(houseId)
179
179
// (2) 권한 체크 ( 작성자 본인이 아닌 경우 )
180
180
if (user != house.user) throw ApplicationException (UNAUTHORIZED_EXCEPTION )
181
- house.address.updateEntity(req.city!! , req.detail!! , req.zipCode!! )
181
+ house.address.updateEntity(req.city!! , req.detail, req.zipCode!! )
182
182
// (3) 연관 테이블 ( 주소 ) 수정
183
183
val content = getContent(req.code!! )
184
184
// (4) 임시저장 -> 등록 && 유효성 검사
@@ -441,7 +441,6 @@ class HouseServiceImpl(
441
441
private fun validationReqDto (req : HouseReqDto ): Boolean {
442
442
if (req.rentalType == null ) throw ReqValidationException (" 매매 타입은 필수값입니다. " )
443
443
if (req.city.isNullOrBlank()) throw ReqValidationException (" 주소는 필수값입니다." )
444
- if (req.detail.isNullOrEmpty()) throw ReqValidationException (" 상세주소는 필수값입니다." )
445
444
if (req.zipCode.isNullOrEmpty()) throw ReqValidationException (" 우편변호는 필수값입니다." )
446
445
if (req.size.isNullOrEmpty()) throw ReqValidationException (" 건물 크기는 필수값입니다." )
447
446
if (req.contact.isNullOrEmpty()) throw ReqValidationException (" 연락 가능한 휴대폰번호는 필수값입니다." )
@@ -463,10 +462,8 @@ class HouseServiceImpl(
463
462
private fun changeNullToBlank (req : HouseReqDto ): HouseReqDto {
464
463
if (req.rentalType == null ) req.rentalType = RentalType .SALE
465
464
if (req.city.isNullOrBlank()) req.city = " "
466
- if (req.detail.isNullOrEmpty()) req.detail = " "
467
465
if (req.zipCode.isNullOrEmpty()) req.zipCode = " "
468
466
if (req.size.isNullOrEmpty()) req.size = " "
469
- if (req.purpose.isNullOrEmpty()) req.purpose = " "
470
467
if (req.contact.isNullOrEmpty()) req.contact = " "
471
468
if (req.createdDate.isNullOrEmpty()) req.createdDate = " "
472
469
if (req.code.isNullOrEmpty()) req.code = " "
0 commit comments