Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -14,71 +14,104 @@
@Api(tags = "계약서 API", description = "계약서 : 정보확인 / 금액 조율 / 적법성 확인")
public interface ContractController {

// step 1 (init)
@ApiOperation(value = "[계약전_임차인] 계약서를 몽고DB에 저장", notes = "계약서에 필요한 항목들을 가져와서 몽고 DB에 계약서 만들기")
// 대기
@ApiOperation(
value = "[대기] 계약전_임차인 | 계약서를 몽고DB에 저장",
notes = "계약서에 필요한 항목들을 가져와서 몽고 DB에 계약서 만들기")
ResponseEntity<ApiResponse<Void>> saveContractMongo(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

// step 1 : start
@ApiOperation(value = "[계약서 _ 정보 조회 1] 계약서 전체 조회", notes = "계약서 가져오기")
// 정보 조회
@ApiOperation(value = "[정보 조회] 계약서 1 | 계약서 전체 조회", notes = "계약서 가져오기")
ResponseEntity<ApiResponse<ContractDTO>> getContract(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

@ApiOperation(value = "[채팅 _ 정보 조회 1] 정보 조회 시작", notes = "정보조회 마지막 단계에서 다음 단계로 넘어가기 Message")
@ApiOperation(value = "[정보 조회] 채팅 1 | 정보 조회 시작", notes = "정보조회 마지막 단계에서 다음 단계로 넘어가기 Message")
ResponseEntity<ApiResponse<Void>> getContractNext(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

// step 1 : finish
@ApiOperation(
value = "[채팅 _ 정보 조회 2] 정보 조회에서 다음단계로 가기",
value = "[정보 조회] 채팅 2 | 정보 조회에서 다음단계로 가기",
notes = "다음 단계 여부(true/false)를 받아서 다음 단계로 넘어가기")
ResponseEntity<ApiResponse<Boolean>> nextStep(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails,
@RequestBody NextStepDTO dto);

@ApiOperation(value = "[채팅 _ 금액 조회 1]", notes = "금액을 조율하기 위해 금액을 조회")
// 금액 조정
@ApiOperation(value = "[금액 조정] 채팅 1 | 금액 조회", notes = "금액을 조율하기 위해 금액을 조회")
ResponseEntity<ApiResponse<PaymentDTO>> getDepositPrice(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

@ApiOperation(value = "[채팅 _ 금액 요청 2]", notes = "임대인이 금액을 요청")
@ApiOperation(value = "[금액 조정] 채팅 2 | 금액 요청 ", notes = "임대인이 금액을 요청")
ResponseEntity<ApiResponse<Void>> saveDepositPrice(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails,
@RequestBody PaymentDTO dto);

@ApiOperation(value = "[채팅 _ 금액 거절 3]", notes = "임차인이 금액을 거절")
@ApiOperation(value = "[금액 조정] 채팅 3 | 금액 거절", notes = "임차인이 금액을 거절")
ResponseEntity<ApiResponse<Void>> deleteDepositPrice(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

@ApiOperation(value = "[채팅 _ 금액 수락 4]", notes = "임대인과 임차인 모두 동의")
@ApiOperation(value = "[금액 조정] 채팅 4 | 금액 수락", notes = "임대인과 임차인 모두 동의")
ResponseEntity<ApiResponse<Void>> updateDepositPrice(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

@ApiOperation(value = "AI 적법성 확인 from 몽고DB", notes = "몽고DB에 있는 계약서를 AI로 보내고, 적법성 받기")
// // 적법성 검사
// @ApiOperation(value = "??? 몽고 디비랑 합친것 [적법성 검사] 계약서 1 | 계약서 전체 조회", notes = "계약서 가져오기")
// ResponseEntity<ApiResponse<ContractDTO>> getContracts(
// @PathVariable Long contractChatId,
// @AuthenticationPrincipal CustomUserDetails userDetails);

@ApiOperation(value = "[적법성 검사] 계약서 1 몽고DB에 특약 저장 ", notes = "몽고DB에 특약 저장하기 ")
ResponseEntity<ApiResponse<Void>> saveSpecialContract(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

@ApiOperation(
value = "[적법성 검사] 채팅 1 | AI 적법성 확인 from 몽고DB ",
notes = "몽고DB에 있는 계약서를 AI로 보내고, 적법성 받기")
ResponseEntity<ApiResponse<LegalityDTO>> getLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

@ApiOperation(value = "특약을 계약서 DB에 저장 FROM 몽고DB", notes = "특약 테이블에 있는걸 계약서로 가져오기")
ResponseEntity<ApiResponse<Void>> saveSpecialContract(
@ApiOperation(value = "[적법성 검사] 채팅 2 | 임대인 수정", notes = "임대인 : 적법성 검사 수정")
ResponseEntity<ApiResponse<Void>> updateOwnerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails,
@RequestBody UpdateLegalityDTO dto);

@ApiOperation(value = "[적법성 검사] 채팅 3 | 임대인 삭제", notes = "임대인 : 적법성 검사 삭제")
ResponseEntity<ApiResponse<String>> deleteOwnerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

@ApiOperation(value = "바뀐 특약 수정 from 몽고DB", notes = "적법성 검사 후 수정된 특약으로 변경")
ResponseEntity<ApiResponse<Void>> updateSpecialContract(
@ApiOperation(value = "[적법성 검사] 채팅 4 | 임차인 수정", notes = "임차인 : 적법성 검사 수정 완료")
ResponseEntity<ApiResponse<Void>> updateBuyerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails,
@RequestBody SpecialContractUpdateDTO dto);

@ApiOperation(value = "적법성 검사 후 다음단계로 넘어가기", notes = "적법성 검사 후 AI 메세지를 보낸다")
@ApiOperation(value = "[적법성 검사] 채팅 5 | 임차인 거절", notes = "임차인 : 적법성 검사 거절")
ResponseEntity<ApiResponse<String>> rejectBuyerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

@ApiOperation(value = "[적법성 검사} 채팅 6 | 적법성 검사 후 다음단계로 넘어가기", notes = "내보내기 단계로 넘어가기")
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

오타 수정 필요

@ApiOperation value에 "적법성 검사}" 형태로 괄호가 일치하지 않습니다.

-      @ApiOperation(value = "[적법성 검사} 채팅 6 | 적법성 검사 후 다음단계로 넘어가기", notes = "내보내기 단계로 넘어가기")
+      @ApiOperation(value = "[적법성 검사] 채팅 6 | 적법성 검사 후 다음단계로 넘어가기", notes = "내보내기 단계로 넘어가기")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@ApiOperation(value = "[적법성 검사} 채팅 6 | 적법성 검사 후 다음단계로 넘어가기", notes = "내보내기 단계로 넘어가기")
@ApiOperation(value = "[적법성 검사] 채팅 6 | 적법성 검사 후 다음단계로 넘어가기", notes = "내보내기 단계로 넘어가기")
🤖 Prompt for AI Agents
In src/main/java/org/scoula/domain/contract/controller/ContractController.java
around line 106, the @ApiOperation value contains a mismatched bracket "[적법성
검사}" — replace the closing curly brace with a closing square bracket so the
string becomes "[적법성 검사]" (or otherwise ensure the opening and closing bracket
types match) and keep the rest of the annotation text unchanged.

ResponseEntity<ApiResponse<Void>> sendStep4(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails);

// 메서드만 만들어서 써도 될 듯
@ApiOperation(value = "바뀐 특약 수정 from 몽고DB", notes = "적법성 검사 후 수정된 특약으로 변경")
ResponseEntity<ApiResponse<Void>> updateSpecialContract(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails,
@RequestBody SpecialContractUpdateDTO dto);
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,26 @@ public ResponseEntity<ApiResponse<Void>> updateDepositPrice(
service.updateDepositPrice(contractChatId, userDetails.getUserId())));
}

// @Override
// @PostMapping("/getContracts")
// public ResponseEntity<ApiResponse<ContractDTO>> getContracts(
// @PathVariable Long contractChatId,
// @AuthenticationPrincipal CustomUserDetails userDetails) {
// return ResponseEntity.ok(
// ApiResponse.success(service.getContract(contractChatId,
// userDetails.getUserId())));
// }

@Override
@PostMapping("/save/special-contract")
public ResponseEntity<ApiResponse<Void>> saveSpecialContract(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails) {
return ResponseEntity.ok(
ApiResponse.success(
service.saveSpecialContract(contractChatId, userDetails.getUserId())));
}

@Override
@PostMapping("/legality")
public ResponseEntity<ApiResponse<LegalityDTO>> getLegality(
Expand All @@ -110,13 +130,45 @@ public ResponseEntity<ApiResponse<LegalityDTO>> getLegality(
}

@Override
@PostMapping("/specialContract")
public ResponseEntity<ApiResponse<Void>> saveSpecialContract(
@DeleteMapping("/delete/legality")
public ResponseEntity<ApiResponse<String>> deleteOwnerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails) {
return ResponseEntity.ok(
ApiResponse.success(
service.saveSpecialContract(contractChatId, userDetails.getUserId())));
service.deleteOwnerLegality(contractChatId, userDetails.getUserId())));
}

@Override
@PostMapping("/suggest/legality")
public ResponseEntity<ApiResponse<Void>> updateOwnerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails,
@RequestBody UpdateLegalityDTO dto) {
return ResponseEntity.ok(
ApiResponse.success(
service.updateOwnerLegality(contractChatId, userDetails.getUserId(), dto)));
}

@Override
@PostMapping("/update/legality")
public ResponseEntity<ApiResponse<Void>> updateBuyerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails,
@RequestBody SpecialContractUpdateDTO dto) {
return ResponseEntity.ok(
ApiResponse.success(
service.updateBuyerLegality(contractChatId, userDetails.getUserId(), dto)));
}

@Override
@GetMapping("/reject/legality")
public ResponseEntity<ApiResponse<String>> rejectBuyerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails) {
return ResponseEntity.ok(
ApiResponse.success(
service.rejectBuyerLegality(contractChatId, userDetails.getUserId())));
}
Comment on lines +164 to 172
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

거절(상태 변경)을 GET으로 노출하면 안 됩니다

거절은 서버 상태를 변경하므로 GET 대신 POST(또는 PATCH)를 사용하세요. 경로도 명확히 표기하는 것을 권장합니다.

적용 제안(diff):

-      @GetMapping("/reject/legality")
+      @PostMapping("/legality/reject")
       public ResponseEntity<ApiResponse<String>> rejectBuyerLegality(
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@Override
@GetMapping("/reject/legality")
public ResponseEntity<ApiResponse<String>> rejectBuyerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails) {
return ResponseEntity.ok(
ApiResponse.success(
service.rejectBuyerLegality(contractChatId, userDetails.getUserId())));
}
@Override
@PostMapping("/legality/reject")
public ResponseEntity<ApiResponse<String>> rejectBuyerLegality(
@PathVariable Long contractChatId,
@AuthenticationPrincipal CustomUserDetails userDetails) {
return ResponseEntity.ok(
ApiResponse.success(
service.rejectBuyerLegality(contractChatId, userDetails.getUserId())));
}
🤖 Prompt for AI Agents
In
src/main/java/org/scoula/domain/contract/controller/ContractControllerImpl.java
around lines 163-171, the endpoint currently uses GET for a state-changing
"reject" action and also fails to include the contractChatId in the path; change
the mapping to a state-changing verb (use @PostMapping or @PatchMapping) and
include the id in the URI (e.g. "/{contractChatId}/reject/legality"), keeping
the existing @PathVariable Long contractChatId parameter; update any API
docs/tests to reflect the new HTTP method and path.


@Override
Expand Down
16 changes: 10 additions & 6 deletions src/main/java/org/scoula/domain/contract/dto/ContractDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.stream.Collectors;

import org.scoula.domain.contract.document.ContractMongoDocument;
import org.scoula.domain.precontract.vo.IdentityVerificationInfoVO;
import org.scoula.global.common.constant.Constants;

import com.fasterxml.jackson.annotation.JsonFormat;
Expand Down Expand Up @@ -63,15 +64,18 @@ public static class SpecialContractDTO {
private String content;
}

public static ContractDTO toDTO(ContractMongoDocument document) {
public static ContractDTO toDTO(
ContractMongoDocument document,
IdentityVerificationInfoVO ownerVO,
IdentityVerificationInfoVO buyerVO) {
return ContractDTO.builder()
.contractChatId(document.getContractChatId())
.contractChatId(ownerVO.getContractId())
.ownerName(document.getOwnerName())
.ownerAddr(document.getOwnerAddr())
.ownerPhoneNum(document.getOwnerPhoneNum())
.ownerAddr(ownerVO.getAddr1() + " " + ownerVO.getAddr2())
.ownerPhoneNum(ownerVO.getPhoneNumber())
.buyerName(document.getBuyerName())
.buyerAddr(document.getBuyerAddr())
.buyerPhoneNum(document.getBuyerPhoneNum())
.buyerAddr(buyerVO.getAddr1() + " " + buyerVO.getAddr2())
.buyerPhoneNum(buyerVO.getPhoneNumber())
Comment on lines +74 to +78
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

주소 결합 시 null 체크 필요

주소 필드를 문자열 연결로 결합할 때 null 값에 대한 처리가 없어 "null null" 같은 문자열이 생성될 수 있습니다.

-                 .ownerAddr(ownerVO.getAddr1() + " " + ownerVO.getAddr2())
-                 .ownerPhoneNum(ownerVO.getPhoneNumber())
+                 .ownerAddr(formatAddress(ownerVO.getAddr1(), ownerVO.getAddr2()))
+                 .ownerPhoneNum(ownerVO.getPhoneNumber())
                  .buyerName(document.getBuyerName())
-                 .buyerAddr(buyerVO.getAddr1() + " " + buyerVO.getAddr2())
-                 .buyerPhoneNum(buyerVO.getPhoneNumber())
+                 .buyerAddr(formatAddress(buyerVO.getAddr1(), buyerVO.getAddr2()))
+                 .buyerPhoneNum(buyerVO.getPhoneNumber())

다음 헬퍼 메서드를 클래스에 추가하세요:

private static String formatAddress(String addr1, String addr2) {
    if (addr1 == null && addr2 == null) {
        return "";
    }
    if (addr1 == null) {
        return addr2;
    }
    if (addr2 == null) {
        return addr1;
    }
    return addr1 + " " + addr2;
}
🤖 Prompt for AI Agents
In src/main/java/org/scoula/domain/contract/dto/ContractDTO.java around lines 74
to 78, the code concatenates address parts directly which can produce "null"
text when either part is null; add the suggested private static String
formatAddress(String addr1, String addr2) helper to the class and replace
ownerVO.getAddr1() + " " + ownerVO.getAddr2() and buyerVO.getAddr1() + " " +
buyerVO.getAddr2() with calls to formatAddress(ownerVO.getAddr1(),
ownerVO.getAddr2()) and formatAddress(buyerVO.getAddr1(), buyerVO.getAddr2())
respectively so nulls are handled and empty strings returned when both parts are
null.

.homeAddr1(document.getHomeAddr1())
.homeAddr2(document.getHomeAddr2())
.residenceType(document.getResidenceType())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.scoula.domain.contract.dto;

import lombok.*;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class LegalityRequestDTO {
private String legalBasis;
private Long requestId;
private String createdAt;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.scoula.domain.contract.dto;

import lombok.*;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class UpdateLegalityDTO {
private String legalBasis;
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ public interface ContractService {
*/
Void updateDepositPrice(Long contractChatId, Long userId);

// /**
// * @param contractChatId 채팅방 아이디
// * @param userId 유저 아이디
// * @return 계약서 내용을 보내기
// */
// ContractDTO getContracts(Long contractChatId, Long userId);

/** * step4 start 특약을 개약 테이블에 저장하기 * * @param contractChatId 채팅방 아이디 * @param userId 유저 아이디 */
Void saveSpecialContract(Long contractChatId, Long userId);

/**
* step4 (init) 계약서를 AI로 보내고, 적법성 받기
*
Expand All @@ -82,20 +92,48 @@ public interface ContractService {
LegalityDTO getLegality(Long contractChatId, Long userId);

/**
* step4 start 특약을 개약 테이블에 저장하기
* step4 적법성 검사 후 수정된 특약으로 변경
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디 @Param dto 변경된 특약
*/
Void updateSpecialContract(Long contractChatId, Long userId, SpecialContractUpdateDTO dto);

/**
* step4 (init) 계약서를 AI로 보내고, 적법성 받기
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
*/
Void saveSpecialContract(Long contractChatId, Long userId);
String deleteOwnerLegality(Long contractChatId, Long userId);

/**
* step4 적법성 검사 후 수정된 특약으로 변경
* step4 (init) 계약서를 AI로 보내고, 적법성 받기
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디 @Param dto 변경된 특약
* @param userId 유저 아이디
* @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
*/
Void updateSpecialContract(Long contractChatId, Long userId, SpecialContractUpdateDTO dto);
Void updateOwnerLegality(Long contractChatId, Long userId, UpdateLegalityDTO dto);

/**
* step4 (init) 계약서를 AI로 보내고, 적법성 받기
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
*/
Void updateBuyerLegality(Long contractChatId, Long userId, SpecialContractUpdateDTO dto);

/**
* step4 (init) 계약서를 AI로 보내고, 적법성 받기
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
*/
String rejectBuyerLegality(Long contractChatId, Long userId);
Comment on lines +95 to +136
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

중복된 JavaDoc 설명 수정 필요

여러 메서드에서 동일한 JavaDoc 설명("계약서를 AI로 보내고, 적법성 받기")이 사용되고 있습니다. 각 메서드의 실제 기능에 맞게 설명을 수정해야 합니다.

-      /**
-       * step4 (init) 계약서를 AI로 보내고, 적법성 받기
-       *
-       * @param contractChatId 채팅방 아이디
-       * @param userId 유저 아이디
-       * @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
-       */
+      /**
+       * step4 임대인의 적법성 요청을 삭제
+       *
+       * @param contractChatId 채팅방 아이디
+       * @param userId 유저 아이디
+       * @return 삭제 완료 메시지
+       */
       String deleteOwnerLegality(Long contractChatId, Long userId);

-      /**
-       * step4 (init) 계약서를 AI로 보내고, 적법성 받기
-       *
-       * @param contractChatId 채팅방 아이디
-       * @param userId 유저 아이디
-       * @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
-       */
+      /**
+       * step4 임대인의 적법성 요청을 업데이트
+       *
+       * @param contractChatId 채팅방 아이디
+       * @param userId 유저 아이디
+       * @param dto 업데이트할 적법성 정보
+       */
       Void updateOwnerLegality(Long contractChatId, Long userId, UpdateLegalityDTO dto);

-      /**
-       * step4 (init) 계약서를 AI로 보내고, 적법성 받기
-       *
-       * @param contractChatId 채팅방 아이디
-       * @param userId 유저 아이디
-       * @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
-       */
+      /**
+       * step4 임차인의 적법성 요청을 업데이트
+       *
+       * @param contractChatId 채팅방 아이디
+       * @param userId 유저 아이디
+       * @param dto 업데이트할 특약 정보
+       */
       Void updateBuyerLegality(Long contractChatId, Long userId, SpecialContractUpdateDTO dto);

-      /**
-       * step4 (init) 계약서를 AI로 보내고, 적법성 받기
-       *
-       * @param contractChatId 채팅방 아이디
-       * @param userId 유저 아이디
-       * @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
-       */
+      /**
+       * step4 임차인의 적법성 요청을 거절
+       *
+       * @param contractChatId 채팅방 아이디
+       * @param userId 유저 아이디
+       * @return 거절 완료 메시지
+       */
       String rejectBuyerLegality(Long contractChatId, Long userId);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* step4 적법성 검사 수정된 특약으로 변경
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디 @Param dto 변경된 특약
*/
Void updateSpecialContract(Long contractChatId, Long userId, SpecialContractUpdateDTO dto);
/**
* step4 (init) 계약서를 AI로 보내고, 적법성 받기
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
*/
Void saveSpecialContract(Long contractChatId, Long userId);
String deleteOwnerLegality(Long contractChatId, Long userId);
/**
* step4 적법성 검사 수정된 특약으로 변경
* step4 (init) 계약서를 AI로 보내고, 적법성 받기
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디 @Param dto 변경된 특약
* @param userId 유저 아이디
* @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
*/
Void updateSpecialContract(Long contractChatId, Long userId, SpecialContractUpdateDTO dto);
Void updateOwnerLegality(Long contractChatId, Long userId, UpdateLegalityDTO dto);
/**
* step4 (init) 계약서를 AI로 보내고, 적법성 받기
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
*/
Void updateBuyerLegality(Long contractChatId, Long userId, SpecialContractUpdateDTO dto);
/**
* step4 (init) 계약서를 AI로 보내고, 적법성 받기
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @return AI가 계약서를 보고 주는 적법성을 리턴값으로 보내기
*/
String rejectBuyerLegality(Long contractChatId, Long userId);
* step4 적법성 검사 수정된 특약으로 변경
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디 @Param dto 변경된 특약
*/
Void updateSpecialContract(Long contractChatId, Long userId, SpecialContractUpdateDTO dto);
/**
* step4 임대인의 적법성 요청을 삭제
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @return 삭제 완료 메시지
*/
String deleteOwnerLegality(Long contractChatId, Long userId);
/**
* step4 임대인의 적법성 요청을 업데이트
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @param dto 업데이트할 적법성 정보
*/
Void updateOwnerLegality(Long contractChatId, Long userId, UpdateLegalityDTO dto);
/**
* step4 임차인의 적법성 요청을 업데이트
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @param dto 업데이트할 특약 정보
*/
Void updateBuyerLegality(Long contractChatId, Long userId, SpecialContractUpdateDTO dto);
/**
* step4 임차인의 적법성 요청을 거절
*
* @param contractChatId 채팅방 아이디
* @param userId 유저 아이디
* @return 거절 완료 메시지
*/
String rejectBuyerLegality(Long contractChatId, Long userId);
🤖 Prompt for AI Agents
In src/main/java/org/scoula/domain/contract/service/ContractService.java around
lines 95 to 136, several methods share an identical JavaDoc ("계약서를 AI로 보내고, 적법성
받기") which is incorrect and should be replaced with specific descriptions:
update the JavaDoc for updateSpecialContract to describe updating special
contract terms after legality check and document params and that it returns
Void; for deleteOwnerLegality describe removing the owner's legality record and
returning the legality string; for updateOwnerLegality describe updating the
owner's legality using UpdateLegalityDTO and returning Void; for
updateBuyerLegality describe updating the buyer's legality/special contract
using SpecialContractUpdateDTO and returning Void; and for rejectBuyerLegality
describe rejecting the buyer's legality check and returning the resulting
message string—also ensure each @param and @return tag accurately reflects the
method signature and behavior.


/**
* step4 finish 적법성 검사 후 다음단계로 넘어가기
Expand Down
Loading
Loading