Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 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
d522b0b
✨ feat: 특약 수정, 삭제, 확정 AI 메시지 처리 수정
leeedongjaee Aug 11, 2025
eb5af90
✨ feat: 특약 수정, 삭제, 확정 AI 메시지 처리 수정
leeedongjaee Aug 11, 2025
2c1a980
✨ feat: 특약 수정, 삭제, 확정 Order번호 중복 수정
leeedongjaee Aug 11, 2025
587fc74
✨ feat: 특약 수정, 삭제, 확정 Order번호 중복 수정
leeedongjaee Aug 11, 2025
e96ddc0
✨ feat: 특약 수정, 삭제, 확정 Order번호 없이 수락 메서드 수정
leeedongjaee Aug 12, 2025
ad74d49
✨ feat: 특약 수정, 삭제, 확정 Order번호 없이 수락 메서드 수정
leeedongjaee Aug 12, 2025
ea21261
✨ feat: 특약 수정, 삭제, 확정 Controller 중복 선언 수정
leeedongjaee Aug 12, 2025
f9a5a47
✨ feat: 특약 ROUND4 추가
leeedongjaee Aug 12, 2025
55b892b
✨ feat: 특약 확정 수락 또는 거절 API 통합
leeedongjaee Aug 12, 2025
7f1b129
✨ feat: 최종 특약 저장 AI 메시지 삭제
leeedongjaee Aug 12, 2025
ccb3a13
✨ feat: 최종 특약 라운드 변경 수정
leeedongjaee Aug 12, 2025
087601f
✨ feat: 최종 특약 저장 AI 메시지 수정
leeedongjaee Aug 12, 2025
38c8538
🌱 chore: git merge
leeedongjaee Aug 12, 2025
fd35ed2
✨ feat: 임대인 사전조사 링크 메시지 수정
leeedongjaee Aug 13, 2025
b6acc63
✨ feat: 계약 채팅 링크 제공 API 구현
leeedongjaee Aug 13, 2025
5b57e28
✨ feat: 계약 채팅 링크 제공 로직 구현
leeedongjaee Aug 13, 2025
fa09a0f
✨ feat: 사전조사 안내 메시지 추가
leeedongjaee Aug 13, 2025
e36cfda
✨ feat: 하드코딩 URL 주소 properties 의존
leeedongjaee Aug 13, 2025
d02cfc4
✨ feat: ROUND4 추가
leeedongjaee Aug 13, 2025
f2bce82
✨ feat: UserId 추출 수정
leeedongjaee Aug 13, 2025
fc5811f
✨ feat: 임대인 인증 메서드 오류 수정
leeedongjaee Aug 13, 2025
3e5e73d
✨ feat: 임대인 인증 메서드 추가
leeedongjaee Aug 13, 2025
f507e0e
✨ feat: 임대인 추출 메서드 추가
leeedongjaee Aug 13, 2025
68e5f5b
✨ feat: URL 하드코딩 수정
leeedongjaee Aug 13, 2025
c025732
✨ feat: URL 하드코딩 의존 추가
leeedongjaee Aug 13, 2025
eef8835
✨ feat: 메시지 내용 수정
leeedongjaee Aug 13, 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
2 changes: 1 addition & 1 deletion config-submodule
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import org.scoula.domain.chat.document.ContractChatDocument;
import org.scoula.domain.chat.document.FinalSpecialContractDocument;
import org.scoula.domain.chat.document.SpecialContractFixDocument;
import org.scoula.domain.chat.dto.ContractChatMessageRequestDto;
import org.scoula.domain.chat.dto.SpecialContractUserViewDto;
import org.scoula.domain.chat.dto.*;
import org.scoula.domain.chat.dto.ai.ClauseImproveResponseDto;
import org.scoula.global.common.dto.ApiResponse;
import org.springframework.http.ResponseEntity;
Expand Down Expand Up @@ -134,6 +133,14 @@ ResponseEntity<ApiResponse<List<SpecialContractFixDocument>>> getCompletedSpecia
ResponseEntity<ApiResponse<List<SpecialContractFixDocument>>> getIncompleteSpecialContracts(
@PathVariable Long contractChatId, Authentication authentication);

@ApiOperation(
value = "메시지 미포함 미완료 특약 문서 목록 조회",
notes = "메시지 내역이 포함되지 않은 미완료된 모든 특약 문서를 조회합니다.")
@GetMapping("/special-contract/{contractChatId}/incomplete/now")
ResponseEntity<ApiResponse<List<SpecialContractFixDocument>>>
getIncompleteSpecialContractsWithoutMessage(
@PathVariable Long contractChatId, Authentication authentication);

@ApiOperation(value = "특약 대화 시작 AI 메시지", notes = "선택된 특약 번호 대화를 시작한다는 메시지를 AI가 전송합니다.")
@PostMapping("/special-contract/{contractChatId}/ai")
ResponseEntity<ApiResponse<String>> sendAiMessage(
Expand All @@ -143,4 +150,73 @@ ResponseEntity<ApiResponse<String>> sendAiMessage(
@GetMapping("/final-contract/{contractChatId}")
ResponseEntity<ApiResponse<FinalSpecialContractDocument>> getFinalSpecialContract(
@PathVariable Long contractChatId, Authentication authentication);

@ApiOperation(value = "최종 특약서 수정 요청 (임대인)", notes = "임대인이 최종 특약서의 특정 조항 수정을 요청합니다.")
@PostMapping("/final-contract/{contractChatId}/modification-request")
ResponseEntity<ApiResponse<ModificationRequestData>> requestFinalContractModification(
@PathVariable Long contractChatId,
@RequestBody FinalContractModificationRequestDto requestDto,
Authentication authentication);

@ApiOperation(value = "최종 특약서 수정 요청 응답 (임차인)", notes = "임차인이 수정 요청을 수락 또는 거절합니다.")
@PostMapping("/final-contract/{contractChatId}/modification-response")
ResponseEntity<ApiResponse<FinalSpecialContractDocument>> respondToModificationRequest(
@PathVariable Long contractChatId,
@RequestBody FinalContractModificationResponseDto responseDto,
Authentication authentication);

@ApiOperation(value = "특정 수정 요청 조회", notes = "특정 조항에 대한 대기중인 수정 요청을 조회합니다.")
@GetMapping("/final-contract/{contractChatId}/modification-request/{clauseOrder}")
ResponseEntity<ApiResponse<ModificationRequestData>> getPendingModificationRequest(
@PathVariable Long contractChatId,
@PathVariable Integer clauseOrder,
Authentication authentication);

@ApiOperation(value = "대기중인 수정 요청 확인", notes = "특정 조항에 대해 대기중인 수정 요청이 있는지 확인합니다.")
@GetMapping("/final-contract/{contractChatId}/has-pending-request/{clauseOrder}")
ResponseEntity<ApiResponse<Boolean>> hasPendingModificationRequest(
@PathVariable Long contractChatId,
@PathVariable Integer clauseOrder,
Authentication authentication);

@ApiOperation(value = "최종 특약 확정 요청 (임대인)", notes = "임대인이 최종 특약서에 대한 확정을 요청합니다.")
@PostMapping("/{contractChatId}/final-contract/request-confirmation")
ResponseEntity<ApiResponse<String>> requestFinalContractConfirmation(
@PathVariable Long contractChatId, Authentication authentication);

@ApiOperation(value = "최종 특약 확정 수락 (임차인)", notes = "임차인이 임대인의 최종 특약서 확정 요청을 수락합니다.")
@PostMapping("/{contractChatId}/final-contract/accept-confirmation")
ResponseEntity<ApiResponse<Map<String, Object>>> acceptFinalContractConfirmation(
@PathVariable Long contractChatId,
@RequestBody FinalContractDeletionResponseDto responseDto,
Authentication authentication);
Comment on lines +191 to +192
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

일관성 없는 메서드 파라미터 타입

FinalContractDeletionResponseDtoacceptFinalContractConfirmation 메서드의 파라미터로 사용되고 있는데, 메서드명과 DTO 이름이 일치하지 않습니다. 확정 수락용 별도 DTO를 만들거나 더 범용적인 DTO 이름을 사용하는 것이 좋습니다.

-    ResponseEntity<ApiResponse<Map<String, Object>>> acceptFinalContractConfirmation(
-            @PathVariable Long contractChatId,
-            @RequestBody FinalContractDeletionResponseDto responseDto,
-            Authentication authentication);
+    ResponseEntity<ApiResponse<Map<String, Object>>> acceptFinalContractConfirmation(
+            @PathVariable Long contractChatId,
+            @RequestBody FinalContractConfirmationResponseDto responseDto,
+            Authentication authentication);
📝 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
@RequestBody FinalContractDeletionResponseDto responseDto,
Authentication authentication);
ResponseEntity<ApiResponse<Map<String, Object>>> acceptFinalContractConfirmation(
@PathVariable Long contractChatId,
@RequestBody FinalContractConfirmationResponseDto responseDto,
Authentication authentication);
🤖 Prompt for AI Agents
In src/main/java/org/scoula/domain/chat/controller/ContractChatController.java
around lines 191-192, the method acceptFinalContractConfirmation(...) currently
uses FinalContractDeletionResponseDto which does not match the method intent;
change this by either creating a dedicated DTO named
AcceptFinalContractRequestDto (or similar) for accepting the final contract and
replace the parameter type, or rename the existing DTO to a more
generic/appropriate name and update all usages; ensure the new DTO contains only
the required fields, update any validation, mappers, controller tests and API
docs/signatures accordingly so types are consistent with the method purpose.


@ApiOperation(value = "최종 특약 삭제 요청 (임대인)", notes = "임대인이 최종 특약서의 특정 조항 삭제를 요청합니다.")
@PostMapping("/final-contract/{contractChatId}/deletion-request/{clauseOrder}")
ResponseEntity<ApiResponse<String>> requestFinalContractDeletion(
@PathVariable Long contractChatId,
@PathVariable Integer clauseOrder,
Authentication authentication);

@ApiOperation(value = "현재 스텝 조회", notes = "현재 진행 상황을 조회합니다.")
@GetMapping("/{contractChatId}/status")
ResponseEntity<ApiResponse<String>> getContractStatus(
@PathVariable Long contractChatId, Authentication authentication);

@ApiOperation(value = "전체 라운드 특약 문서 조회", notes = "모든 라운드의 특약 문서를 조회합니다.")
@GetMapping("/special-contract/{contractChatId}/all-rounds")
ResponseEntity<ApiResponse<Map<String, Object>>> getAllRoundsSpecialContract(
@PathVariable Long contractChatId, Authentication authentication);

@ApiOperation(value = "최종 특약 삭제 요청 응답", notes = "임차인이 삭제 요청을 수락 또는 거절합니다.")
@PostMapping("/final-contract/{contractChatId}/deletion-response")
ResponseEntity<ApiResponse<Map<String, Object>>> respondToFinalContractDeletion(
@PathVariable Long contractChatId,
@RequestBody FinalContractDeletionResponseDto responseDto,
Authentication authentication);

@ApiOperation(value = "계약 채팅방 URL 이동", notes = "계약 채팅방 URL로 이동하는 API")
@GetMapping("/{chatRoomId}/moveContractChat")
ResponseEntity<ApiResponse<String>> moveContractChat(
@PathVariable Long chatRoomId, Authentication authentication);
}
Loading
Loading