-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] 계약 특약 및 적법성 검사 로직 구현 #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
fa97a00
✨ feat: code formatting
leeedongjaee ecb0677
✨ feat: 최종 특약 수정, 삭제 요청 및 수락 구현
leeedongjaee 474fe5e
✨ feat: 최종 특약 삭제 메서드 수정
leeedongjaee 45f4d11
✨ feat: 최종 특약 수정, 삭제 Dto 구현
leeedongjaee 242a53f
✨ feat: 계약 최종 특약 관련 메시지 AI 처리
leeedongjaee d522b0b
✨ feat: 특약 수정, 삭제, 확정 AI 메시지 처리 수정
leeedongjaee eb5af90
✨ feat: 특약 수정, 삭제, 확정 AI 메시지 처리 수정
leeedongjaee 2c1a980
✨ feat: 특약 수정, 삭제, 확정 Order번호 중복 수정
leeedongjaee 587fc74
✨ feat: 특약 수정, 삭제, 확정 Order번호 중복 수정
leeedongjaee e96ddc0
✨ feat: 특약 수정, 삭제, 확정 Order번호 없이 수락 메서드 수정
leeedongjaee ad74d49
✨ feat: 특약 수정, 삭제, 확정 Order번호 없이 수락 메서드 수정
leeedongjaee ea21261
✨ feat: 특약 수정, 삭제, 확정 Controller 중복 선언 수정
leeedongjaee f9a5a47
✨ feat: 특약 ROUND4 추가
leeedongjaee 55b892b
✨ feat: 특약 확정 수락 또는 거절 API 통합
leeedongjaee 7f1b129
✨ feat: 최종 특약 저장 AI 메시지 삭제
leeedongjaee ccb3a13
✨ feat: 최종 특약 라운드 변경 수정
leeedongjaee 087601f
✨ feat: 최종 특약 저장 AI 메시지 수정
leeedongjaee 38c8538
🌱 chore: git merge
leeedongjaee fd35ed2
✨ feat: 임대인 사전조사 링크 메시지 수정
leeedongjaee b6acc63
✨ feat: 계약 채팅 링크 제공 API 구현
leeedongjaee 5b57e28
✨ feat: 계약 채팅 링크 제공 로직 구현
leeedongjaee fa09a0f
✨ feat: 사전조사 안내 메시지 추가
leeedongjaee e36cfda
✨ feat: 하드코딩 URL 주소 properties 의존
leeedongjaee d02cfc4
✨ feat: ROUND4 추가
leeedongjaee f2bce82
✨ feat: UserId 추출 수정
leeedongjaee fc5811f
✨ feat: 임대인 인증 메서드 오류 수정
leeedongjaee 3e5e73d
✨ feat: 임대인 인증 메서드 추가
leeedongjaee f507e0e
✨ feat: 임대인 추출 메서드 추가
leeedongjaee 68e5f5b
✨ feat: URL 하드코딩 수정
leeedongjaee c025732
✨ feat: URL 하드코딩 의존 추가
leeedongjaee eef8835
✨ feat: 메시지 내용 수정
leeedongjaee 76e2e9e
✨ feat: 계약채팅방 접속 상태 확인 메서드 수정
leeedongjaee 14e8ec8
✨ feat: principal null 오류 수정
leeedongjaee 91eb1c9
✨ feat: 일반채팅방 id값 반환 수정
leeedongjaee d60c6c7
✨ feat: principal null 오류 수정
leeedongjaee a55cf8c
✨ feat: 일반 채팅방 아이디값 반환으로 수정
leeedongjaee b78f173
🐛 fix: 접속상태 오류 수정
Whatdoyumin f29488c
🐛 fix: 접속상태 오류 수정
Whatdoyumin 782ad83
🐛 fix: 접속상태 오류 수정
Whatdoyumin 14a1e61
🌱 chore: git merge
leeedongjaee 3bffed2
🐛 fix: 접속상태 오류 수정
Whatdoyumin 6dcce83
✨ feat: role 반환명 수정
Whatdoyumin ef8bd27
✨ feat: selectRentTypeAll mapper 추가
Whatdoyumin 3755d8e
✨ feat: 정보확인 및 금액조율 단계 AI 메시지 수정
Whatdoyumin 56bb583
✨ feat: serviceImpl 수정
Whatdoyumin 3af890d
✨ feat: controllerImpl 수정
Whatdoyumin ef43315
✨ feat: serviceImpl 수정
Whatdoyumin 4165b83
✨ feat: serviceImpl 수정
Whatdoyumin a3b5d93
✨ feat: 적법성 검사 관련 Service 로직 분리 구현
leeedongjaee 6b9f278
✨ feat: 적법성 검사 관련 Service 로직 분리
leeedongjaee f4de98f
✨ feat: 적법성 검사 관련 Service 분리된 로직 의존성 주입
leeedongjaee ec571c6
✨ feat: 적법성 검사 관련 Service 분리된 로직 의존성 주입
leeedongjaee b421fbc
✨ feat: 적법성 검사 로직 수정 및 9996 Ai 메시지 메서드 추가
leeedongjaee eae5420
✨ feat: order 수정
Whatdoyumin a1afd20
Merge branch 'develop' of https://github.com/ITZEEP/backend into feat…
Whatdoyumin 9a5322c
✨ feat: final_contract의 특약 내용 지우기 메서드 추가
leeedongjaee 1207293
✨ feat: 최종 계약 내용 확정 요청 및 수락 api 추가
leeedongjaee 72694f8
✨ feat: 최종 계약 내용 확정 요청 및 수락 로직 구현
leeedongjaee df0b47b
Merge branch 'feature/chat' of https://github.com/ITZEEP/backend into…
Whatdoyumin 76db63e
✨ feat: 사전조사 url HomeId 추가
leeedongjaee e23c748
Merge branch 'develop' of https://github.com/ITZEEP/backend into feat…
Whatdoyumin eed4753
✨ feat: 적법성 검사 로직 수정
leeedongjaee f7fb507
✨ feat: Tread 타임 슬립 지정
leeedongjaee 8cc1078
✨ feat: 적법성 검사 로직 수정
leeedongjaee d28cb15
✨ feat: contractChatId 인자 추가
Whatdoyumin 208d6e3
Merge branch 'feature/chat' of https://github.com/ITZEEP/backend into…
Whatdoyumin 99fc012
✨ feat: 적법성 검사 로직 수정
leeedongjaee 423bac7
✨ feat: LegalityDTO 수정
leeedongjaee ad7fb3d
Merge branch 'feature/chat' of https://github.com/ITZEEP/backend into…
Whatdoyumin c42c728
✨ feat: 적법성 검사 로직 수정
leeedongjaee 1fa88fd
✨ feat: Url 링크에 HomeId 반환
leeedongjaee 56d3d85
✨ feat: 적법성 안내 메시지 수정
leeedongjaee d910c77
✨ feat: 최종 계약 오더 번호 저장 수정
leeedongjaee 85cc503
✨ feat: identityId 값 가져오는 인자에 contractChatId 추가
Whatdoyumin 808286a
✨ feat: identityId 값 가져오는 인자에 contractChatId 추가
Whatdoyumin 0f465a9
✨ feat: code formatting
leeedongjaee 8fda12b
✨ feat: RestApi 요청 수정
leeedongjaee c928f60
✨ feat: order번호 반환 오류 수정
leeedongjaee 4e46d49
✨ feat: rentType 한글로 반환수정
leeedongjaee ebc6099
✨ feat: code formatting
leeedongjaee 60daa00
✨ feat: CORS 오류 해결
Whatdoyumin cf61d02
✨ feat: identityId 인자 추가
Whatdoyumin 691c9fb
✨ feat: pull 반영
Whatdoyumin e1911b1
✨ feat: code formatting
leeedongjaee cbee676
✨ feat: 가격 formatting 수정
leeedongjaee 6fff55c
✨ feat: 가격 조정 메서드 수정
leeedongjaee 0303eab
✨ feat: 위반 번호 반환 수정
leeedongjaee efcba54
✨ feat: AiMessage 수정
leeedongjaee 29be11f
✨ feat: AiMessage sleep 2초 추가
leeedongjaee 5012bd5
✨ feat: AiMessage sleep 2초 추가
leeedongjaee fb02709
✨ feat: 최종 계약 수락 및 거절 로직 수정
leeedongjaee d51f424
✨ feat: 최종 계약 수락 및 거절 로직 수정
leeedongjaee 7040a7f
✨ feat: 최종 계약 수락 및 거절 로직 수정
leeedongjaee 75362f3
✨ feat: CORS 로직 제거
leeedongjaee f34d3e8
♻ refactor:CodeQL 수정
leeedongjaee 0a26ad3
♻ refactor:CodeQL 수정
leeedongjaee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| import java.time.LocalDateTime; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
| import java.util.Objects; | ||
| import java.util.Optional; | ||
|
|
||
| import org.scoula.domain.chat.document.ContractChatDocument; | ||
|
|
@@ -30,11 +31,11 @@ | |
| import org.springframework.security.core.Authentication; | ||
| import org.springframework.web.bind.annotation.*; | ||
|
|
||
| import lombok.extern.slf4j.Slf4j; | ||
| import lombok.extern.log4j.Log4j2; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/api/chat/contract") | ||
| @Slf4j | ||
| @Log4j2 | ||
| public class ContractChatControllerImpl implements ContractChatController { | ||
|
|
||
| private final ContractChatServiceInterface contractChatService; | ||
|
|
@@ -302,11 +303,26 @@ public ResponseEntity<ApiResponse<ClauseImproveResponseDto>> setEndPointAndExpor | |
| @MessageMapping("/contract/chat/enter") | ||
| public void enterContractChatRoom(@Payload Map<String, Long> payload, Principal principal) { | ||
| try { | ||
| log.info("=== WebSocket 계약 채팅방 입장 시작 ==="); | ||
| log.info("payload: {}", payload); | ||
| log.info("principal: {}", principal != null ? principal.getName() : "null"); | ||
| log.info("Thread: {}", Thread.currentThread().getName()); | ||
|
|
||
| Long userId = payload.get("userId"); | ||
| Long contractChatId = payload.get("contractChatId"); | ||
|
|
||
| log.info("추출된 userId: {}, contractChatId: {}", userId, contractChatId); | ||
|
|
||
| if (userId == null || contractChatId == null) { | ||
| log.error("필수 파라미터 누락 - userId: {}, contractChatId: {}", userId, contractChatId); | ||
| return; | ||
| } | ||
|
|
||
| contractChatService.enterContractChatRoom(contractChatId, userId); | ||
|
|
||
| notifyContractChatOnlineStatus(contractChatId, userId, true); | ||
|
|
||
| log.info("=== WebSocket 계약 채팅방 입장 완료 ==="); | ||
| } catch (Exception e) { | ||
| log.error("계약 채팅방 입장 실패", e); | ||
| } | ||
|
|
@@ -418,7 +434,7 @@ public ResponseEntity<ApiResponse<Map<String, Object>>> getContractChatInfo( | |
| if (contractChat == null) { | ||
| throw new BusinessException(ChatErrorCode.CHAT_ROOM_NOT_FOUND); | ||
| } | ||
| String role = userId == contractChat.getOwnerId() ? "임대인입니다" : "임차인입니다"; | ||
| String role = Objects.equals(userId, contractChat.getOwnerId()) ? "임대인" : "임차인"; | ||
|
|
||
| Map<String, Object> contractInfo = | ||
| Map.of( | ||
|
|
@@ -938,8 +954,24 @@ public ResponseEntity<ApiResponse<Map<String, Object>>> acceptFinalContractConfi | |
| } | ||
| } | ||
|
|
||
| @Override | ||
| @GetMapping("/{contractChatId}/status") | ||
| // 디버깅용 임시 엔드포인트 | ||
| @PostMapping("/{contractChatId}/debug/enter") | ||
| public ResponseEntity<ApiResponse<String>> debugEnterContractChatRoom( | ||
| @PathVariable Long contractChatId, Authentication authentication) { | ||
| try { | ||
| Long userId = getUserIdFromAuthentication(authentication); | ||
| log.info("=== HTTP 디버그 계약 채팅방 입장 ==="); | ||
| log.info("contractChatId: {}, userId: {}", contractChatId, userId); | ||
|
|
||
| contractChatService.enterContractChatRoom(contractChatId, userId); | ||
|
|
||
| return ResponseEntity.ok(ApiResponse.success("입장 완료")); | ||
| } catch (Exception e) { | ||
| log.error("디버그 입장 실패", e); | ||
| return ResponseEntity.badRequest().body(ApiResponse.error("입장 실패: " + e.getMessage())); | ||
| } | ||
| } | ||
|
Comment on lines
+957
to
+973
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 디버깅 엔드포인트 보안 검토 필요 디버깅용 임시 엔드포인트가 추가되었습니다. 프로덕션 환경에 배포되지 않도록 주의가 필요합니다:
+import org.springframework.context.annotation.Profile;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
// 디버깅용 임시 엔드포인트
+@Profile({"dev", "local"}) // 개발/로컬 환경에서만 활성화
@PostMapping("/{contractChatId}/debug/enter")
public ResponseEntity<ApiResponse<String>> debugEnterContractChatRoom(또는 프로덕션 배포 전에 이 엔드포인트를 완전히 제거하는 것을 권장합니다. 🤖 Prompt for AI Agents |
||
|
|
||
| public ResponseEntity<ApiResponse<String>> getContractStatus( | ||
| @PathVariable Long contractChatId, Authentication authentication) { | ||
| Long userId = getUserIdFromAuthentication(authentication); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
로깅 프레임워크 변경: Slf4j → Log4j2
Slf4j에서 Log4j2로 로깅 프레임워크를 변경했습니다. 프로젝트 전체에서 일관된 로깅 프레임워크를 사용하는지 확인이 필요합니다.
Also applies to: 38-38
🏁 Script executed:
Length of output: 2293
전체 로깅 어노테이션 통일 필요: Slf4j → Log4j2
프로젝트 전반에서 일관된 로깅 프레임워크 사용을 위해, 아래 4개 클래스에 남아 있는
@Slf4j어노테이션을@Log4j2로 변경해 주세요.