Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 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
76e2e9e
✨ feat: 계약채팅방 접속 상태 확인 메서드 수정
leeedongjaee Aug 14, 2025
14e8ec8
✨ feat: principal null 오류 수정
leeedongjaee Aug 14, 2025
91eb1c9
✨ feat: 일반채팅방 id값 반환 수정
leeedongjaee Aug 14, 2025
d60c6c7
✨ feat: principal null 오류 수정
leeedongjaee Aug 14, 2025
a55cf8c
✨ feat: 일반 채팅방 아이디값 반환으로 수정
leeedongjaee Aug 14, 2025
b78f173
🐛 fix: 접속상태 오류 수정
Whatdoyumin Aug 14, 2025
f29488c
🐛 fix: 접속상태 오류 수정
Whatdoyumin Aug 14, 2025
782ad83
🐛 fix: 접속상태 오류 수정
Whatdoyumin Aug 14, 2025
14a1e61
🌱 chore: git merge
leeedongjaee Aug 14, 2025
3bffed2
🐛 fix: 접속상태 오류 수정
Whatdoyumin Aug 14, 2025
6dcce83
✨ feat: role 반환명 수정
Whatdoyumin Aug 17, 2025
ef8bd27
✨ feat: selectRentTypeAll mapper 추가
Whatdoyumin Aug 17, 2025
3755d8e
✨ feat: 정보확인 및 금액조율 단계 AI 메시지 수정
Whatdoyumin Aug 17, 2025
56bb583
✨ feat: serviceImpl 수정
Whatdoyumin Aug 17, 2025
3af890d
✨ feat: controllerImpl 수정
Whatdoyumin Aug 17, 2025
ef43315
✨ feat: serviceImpl 수정
Whatdoyumin Aug 17, 2025
4165b83
✨ feat: serviceImpl 수정
Whatdoyumin Aug 17, 2025
a3b5d93
✨ feat: 적법성 검사 관련 Service 로직 분리 구현
leeedongjaee Aug 17, 2025
6b9f278
✨ feat: 적법성 검사 관련 Service 로직 분리
leeedongjaee Aug 17, 2025
f4de98f
✨ feat: 적법성 검사 관련 Service 분리된 로직 의존성 주입
leeedongjaee Aug 17, 2025
ec571c6
✨ feat: 적법성 검사 관련 Service 분리된 로직 의존성 주입
leeedongjaee Aug 17, 2025
b421fbc
✨ feat: 적법성 검사 로직 수정 및 9996 Ai 메시지 메서드 추가
leeedongjaee Aug 17, 2025
eae5420
✨ feat: order 수정
Whatdoyumin Aug 17, 2025
a1afd20
Merge branch 'develop' of https://github.com/ITZEEP/backend into feat…
Whatdoyumin Aug 17, 2025
9a5322c
✨ feat: final_contract의 특약 내용 지우기 메서드 추가
leeedongjaee Aug 17, 2025
1207293
✨ feat: 최종 계약 내용 확정 요청 및 수락 api 추가
leeedongjaee Aug 17, 2025
72694f8
✨ feat: 최종 계약 내용 확정 요청 및 수락 로직 구현
leeedongjaee Aug 17, 2025
df0b47b
Merge branch 'feature/chat' of https://github.com/ITZEEP/backend into…
Whatdoyumin Aug 17, 2025
76db63e
✨ feat: 사전조사 url HomeId 추가
leeedongjaee Aug 17, 2025
e23c748
Merge branch 'develop' of https://github.com/ITZEEP/backend into feat…
Whatdoyumin Aug 17, 2025
eed4753
✨ feat: 적법성 검사 로직 수정
leeedongjaee Aug 17, 2025
f7fb507
✨ feat: Tread 타임 슬립 지정
leeedongjaee Aug 17, 2025
8cc1078
✨ feat: 적법성 검사 로직 수정
leeedongjaee Aug 17, 2025
d28cb15
✨ feat: contractChatId 인자 추가
Whatdoyumin Aug 17, 2025
208d6e3
Merge branch 'feature/chat' of https://github.com/ITZEEP/backend into…
Whatdoyumin Aug 17, 2025
99fc012
✨ feat: 적법성 검사 로직 수정
leeedongjaee Aug 17, 2025
423bac7
✨ feat: LegalityDTO 수정
leeedongjaee Aug 17, 2025
ad7fb3d
Merge branch 'feature/chat' of https://github.com/ITZEEP/backend into…
Whatdoyumin Aug 17, 2025
c42c728
✨ feat: 적법성 검사 로직 수정
leeedongjaee Aug 17, 2025
1fa88fd
✨ feat: Url 링크에 HomeId 반환
leeedongjaee Aug 17, 2025
56d3d85
✨ feat: 적법성 안내 메시지 수정
leeedongjaee Aug 17, 2025
d910c77
✨ feat: 최종 계약 오더 번호 저장 수정
leeedongjaee Aug 17, 2025
85cc503
✨ feat: identityId 값 가져오는 인자에 contractChatId 추가
Whatdoyumin Aug 17, 2025
808286a
✨ feat: identityId 값 가져오는 인자에 contractChatId 추가
Whatdoyumin Aug 17, 2025
0f465a9
✨ feat: code formatting
leeedongjaee Aug 17, 2025
8fda12b
✨ feat: RestApi 요청 수정
leeedongjaee Aug 17, 2025
c928f60
✨ feat: order번호 반환 오류 수정
leeedongjaee Aug 17, 2025
4e46d49
✨ feat: rentType 한글로 반환수정
leeedongjaee Aug 17, 2025
ebc6099
✨ feat: code formatting
leeedongjaee Aug 17, 2025
60daa00
✨ feat: CORS 오류 해결
Whatdoyumin Aug 17, 2025
cf61d02
✨ feat: identityId 인자 추가
Whatdoyumin Aug 17, 2025
691c9fb
✨ feat: pull 반영
Whatdoyumin Aug 17, 2025
e1911b1
✨ feat: code formatting
leeedongjaee Aug 17, 2025
cbee676
✨ feat: 가격 formatting 수정
leeedongjaee Aug 17, 2025
6fff55c
✨ feat: 가격 조정 메서드 수정
leeedongjaee Aug 17, 2025
0303eab
✨ feat: 위반 번호 반환 수정
leeedongjaee Aug 17, 2025
efcba54
✨ feat: AiMessage 수정
leeedongjaee Aug 17, 2025
29be11f
✨ feat: AiMessage sleep 2초 추가
leeedongjaee Aug 17, 2025
5012bd5
✨ feat: AiMessage sleep 2초 추가
leeedongjaee Aug 17, 2025
fb02709
✨ feat: 최종 계약 수락 및 거절 로직 수정
leeedongjaee Aug 18, 2025
d51f424
✨ feat: 최종 계약 수락 및 거절 로직 수정
leeedongjaee Aug 18, 2025
7040a7f
✨ feat: 최종 계약 수락 및 거절 로직 수정
leeedongjaee Aug 18, 2025
75362f3
✨ feat: CORS 로직 제거
leeedongjaee Aug 18, 2025
f34d3e8
♻ refactor:CodeQL 수정
leeedongjaee Aug 18, 2025
0a26ad3
♻ refactor:CodeQL 수정
leeedongjaee 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 @@ -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;
Expand All @@ -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;
Copy link

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:

#!/bin/bash
# Log4j2와 Slf4j 사용 현황 확인
echo "=== Checking logging framework usage ==="
echo "Log4j2 annotations:"
rg -n "@Log4j2" --type java | head -20
echo ""
echo "Slf4j annotations:"
rg -n "@Slf4j" --type java | head -20

Length of output: 2293


전체 로깅 어노테이션 통일 필요: Slf4j → Log4j2

프로젝트 전반에서 일관된 로깅 프레임워크 사용을 위해, 아래 4개 클래스에 남아 있는 @Slf4j 어노테이션을 @Log4j2로 변경해 주세요.

  • src/main/java/org/scoula/global/common/controller/EncryptionKeyCheckController.java (23행)
  • src/main/java/org/scoula/auth/util/S3Uploader.java (24행)
  • src/main/java/org/scoula/domain/chat/repository/ContractChatMessageRepository.java (16행)
  • src/main/java/org/scoula/domain/fraud/service/FraudRiskServiceImpl.java (44행)


@RestController
@RequestMapping("/api/chat/contract")
@Slf4j
@Log4j2
public class ContractChatControllerImpl implements ContractChatController {

private final ContractChatServiceInterface contractChatService;
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

디버깅 엔드포인트 보안 검토 필요

디버깅용 임시 엔드포인트가 추가되었습니다. 프로덕션 환경에 배포되지 않도록 주의가 필요합니다:

  1. 프로필 기반 조건부 활성화 고려
  2. 접근 권한 제한 필요
  3. 배포 전 제거 확인
+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
In
src/main/java/org/scoula/domain/chat/controller/ContractChatControllerImpl.java
around lines 957 to 973, the temporary debug POST endpoint for entering contract
chat rooms is a security risk for production; either remove this endpoint before
deploy or guard it so it cannot run in production: restrict activation to
non-production profiles or a specific debug property (e.g., @Profile or
@ConditionalOnProperty) and add proper access control (e.g., require an
admin/developer role via security annotations or explicit authentication checks)
so only authorized users can call it; ensure any logging or error messages do
not leak sensitive data and document removal/deactivation in the deployment
checklist.


public ResponseEntity<ApiResponse<String>> getContractStatus(
@PathVariable Long contractChatId, Authentication authentication) {
Long userId = getUserIdFromAuthentication(authentication);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,13 @@ public Long acceptContractRequest(Long chatRoomId, Long userId) {
.build();

handleChatMessage(acceptMessage);
String contractChatUrl = URL + PRECONTRACTURL + (contractChatRoomId.toString()) + BUYERURL;
String contractChatUrl =
URL
+ PRECONTRACTURL
+ (contractChatRoomId.toString())
+ BUYERURL
+ "&homeId="
+ (originalChatRoom.getHomeId());

ChatMessageRequestDto linkMessage =
ChatMessageRequestDto.builder()
Expand Down
Loading
Loading