Skip to content

Conversation

@ggamnunq
Copy link
Contributor

@ggamnunq ggamnunq commented Aug 18, 2025

  • 유저
    • 마이페이지 기본정보 조회 API 구현
    • email null 허용 -> 미허용 변경
    • 유저 좋아요 정보 조회 API 구현
  • 지도
    • 지도 조회에서 위도/경도 계산 방식 변경
    • 중앙 기준 -> 양끝점(좌상단, 우하단) 기준
  • 채팅
    • 채팅 기록 조회 cursor 기반 페이지네이션 추가

Summary by CodeRabbit

  • New Features
    • 채팅 내역 커서 기반 페이지네이션 지원(cursor-id, page-size, nextCursor 반환, 최대 30).
    • 지도 혼잡도 조회에 사각형 영역(lat1,lng1,lat2,lng2) 입력 및 유효성 검사 추가.
    • 카카오 로그인 콜백(리다이렉트) 및 게스트 로그인 API 추가.
    • 마이페이지 조회, 내 좋아요 목록 조회(정렬 옵션) 제공; 검색 결과에 likeCount와 sort 포함.
    • 문화시설(CULTURE) 카테고리 추가.
  • Refactor
    • 로그인 엔드포인트를 인증 전용으로 분리, 사용자 API 경로를 /api/users로 조정.
    • 지도 엔드포인트 파라미터를 단일 좌표 → 사각형 좌표로 변경.
    • 채팅/지도 관련 오류 코드 및 메시지 추가.

  - place, festival list에서 DTO List로 변환하는 로직 util 파일로 분리하여 검색 API와 같이 사용
  - 좋아요 정렬 위해 명소와 축제 각각 조회 쿼리 추가
  - 채팅 전송 API 요청 정보 중 time 제거
  - 지도 조회 API 예외 응답 처리
@ggamnunq ggamnunq self-assigned this Aug 18, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

채팅 히스토리에 커서 기반 페이징과 DTO 변경을 도입하고, 지도 혼잡도 조회는 사각형 좌표 입력과 유효성 검증으로 변경되었습니다. 검색 영역은 좋아요 집계/정렬을 SearchUtil로 위임하고 관련 레포지토리 메서드를 추가했습니다. 유저 API는 인증(콜백/게스트) 분리와 마이페이지/좋아요 조회로 분리 개편되었습니다. 오류코드가 추가되고 일부 DTO/패키지 경로가 이동되었습니다. WebFlux 의존성이 제거되었습니다.

Changes

Cohort / File(s) Summary
Build config
build.gradle
WebFlux 스타터 의존성 제거.
Chat pagination & DTO
.../chat/controller/ChatRestController.kt, .../chat/service/ChatMongoService.kt, .../chat/repository/ChatMongoRepository.kt, .../chat/dto/websocket/ChatMessageResponseDTO.kt, .../chat/dto/websocket/ChatMessageSendDTO.kt
채팅 히스토리 커서/페이지 사이즈 쿼리 파라미터 추가, 페이지 검증, 페이징 조회(Desc 정렬) 및 nextCursor 응답. 사용자 배치 조회로 매핑 최적화. DTO에 nextCursor 추가, userName nullable, 전송 DTO에서 time 제거.
Map bbox query & validation
.../place/controller/PlaceCongestionController.kt, .../place/service/PlaceCongestionQueryService.kt
지도 API가 (lat1,lng1,lat2,lng2) 사각형 입력을 사용. 위도/경도 범위 및 좌표 순서 검증 추가. 서비스 시그니처/쿼리 범위 변경.
Search refactor & likes aggregation
.../search/service/SearchQueryService.kt, .../search/util/SearchUtil.kt, .../search/dto/SearchResultDTO.kt, .../place/repository/PlaceRepository.kt, .../place/repository/PlaceLikeRepository.kt, .../festival/repository/FestivalRepository.kt, .../festival/repository/FestivalLikesRepository.kt
검색 서비스가 Place/Festival 좋아요 레포지토리 사용 및 SearchUtil로 DTO 생성 위임. 결과에 sort 헤더 추가, InfoDto에 likeCount 추가. 사용자 좋아요/정렬(LIKE, CONGESTION 등) 처리와 페치 조인 쿼리 추가.
User auth split & DTO moves
.../user/controller/UserAuthController.kt, .../user/util/LoginRedirectUtil.kt, .../user/service/UserCommandService.kt, .../user/converter/UserConverter.kt, .../user/data/dto/login/*
인증 전용 컨트롤러 추가(카카오 콜백 302 리다이렉트, 게스트 로그인). 로그인 DTO 패키지 분리(login.*) 및 사용처 시그니처 변경. 카카오 이메일 누락 시 예외 처리 강화.
User read API & DTOs
.../user/controller/UserController.kt, .../user/service/UserQueryService.kt, .../user/data/dto/UserResponseDTO.kt, .../user/data/dto/UserLikesDTO.kt
유저 컨트롤러를 조회 전용(/api/users)으로 변경(마이페이지, 좋아요 목록). QueryService 신설. MyPageDto 신설, UserLikesDTO 추가.
Domain tweaks
.../common/dto/InfoType.kt, .../user/data/User.kt, .../user/repository/UserRepository.kt
InfoType에 placeType 필드와 CULTURE 추가. User.email을 non-null로 변경. UserRepository에 findUsersByIdIn 추가.
Error codes
.../global/apiPayload/code/status/ErrorStatus.kt
CHAT 및 MAP 관련 신규 에러코드 6종 추가.
Security import fix
.../global/config/security/JwtTokenProvider.kt
TokenResponseDto 패키지 경로 수정.

Sequence Diagram(s)

sequenceDiagram
  actor Client
  participant Controller as ChatRestController
  participant Service as ChatMongoService
  participant Repo as ChatMongoRepository
  participant UserRepo as UserRepository

  Client->>Controller: GET /api/chat/history?cursor-id&page-size
  Controller->>Service: getChatHistory(cursorId, size)
  Service->>Service: pageSize 검증
  alt cursorId 존재
    Service->>Repo: findByIdLessThanOrderByTimeDesc(id, pageable)
  else 최신
    Service->>Repo: findAllByOrderByTimeDesc(pageable)
  end
  Service->>UserRepo: findUsersByIdIn(userIds)
  Service->>Controller: ListDto(chatList, nextCursor)
  Controller-->>Client: 200 OK
Loading
sequenceDiagram
  actor Client
  participant C as PlaceCongestionController
  participant S as PlaceCongestionQueryService
  participant R as PlaceRepository
  participant Redis as PlaceRedisUtil

  Client->>C: GET /api/place/map?lat1&lng1&lat2&lng2&type
  C->>S: getMap(type, lat1,lng1,lat2,lng2)
  S->>S: 좌표 범위/순서 검증
  S->>R: findByBounds(lat2..lat1, lng1..lng2, type)
  S->>Redis: 혼잡도 조회
  S->>C: MapListDto
  C-->>Client: 200 OK
Loading
sequenceDiagram
  actor Client
  participant UA as UserAuthController
  participant CS as UserCommandService
  participant LR as LoginRedirectUtil

  Client->>UA: GET /users/oauth/kakao?code
  UA->>CS: loginOrRegisterByKakao(code)
  CS-->>UA: UserLoginResponseDTO.LoginDto
  UA->>LR: getRedirectHeader(login)
  LR-->>UA: HttpHeaders(Location: ...)
  UA-->>Client: 302 Found (redirect)
Loading
sequenceDiagram
  actor Client
  participant UC as UserController
  participant QS as UserQueryService
  participant PR as PlaceRepository
  participant FR as FestivalRepository
  participant PLR as PlaceLikeRepository
  participant FLR as FestivalLikesRepository
  participant SU as SearchUtil

  Client->>UC: GET /api/users/likes?option&sort
  UC->>QS: getMyLikes(infoType, sort)
  QS->>PR: findLikePlace*/findLikePlaceByType
  QS->>FR: findLikeFestivals (조건부)
  QS->>PLR: findLikeByPlace(places)
  QS->>FLR: findLikeByFestival(festivals)
  QS->>SU: listToSearchDTO(...)
  SU-->>QS: List<InfoDto>
  QS-->>UC: ListDto(sort, results)
  UC-->>Client: 200 OK
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60–90 minutes

Poem

(\_/) 분주한 발로 깡총깡총
(•ᴗ•) 채팅엔 커서, 지돈엔 사각형!
좋아요 모아 휘리릭 정렬,
로그인은 척—리다이렉트 펼쳐져요.
새 오류코드도 토닥토닥,
오늘도 레포는 당근처럼 바삭! 🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Free

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5a79351 and ea59ffa.

📒 Files selected for processing (32)
  • build.gradle (0 hunks)
  • src/main/kotlin/busanVibe/busan/domain/chat/controller/ChatRestController.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/chat/dto/websocket/ChatMessageResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/chat/dto/websocket/ChatMessageSendDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/chat/repository/ChatMongoRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/chat/service/ChatMongoService.kt (3 hunks)
  • src/main/kotlin/busanVibe/busan/domain/common/dto/InfoType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalLikesRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalRepository.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/controller/PlaceCongestionController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceLikeRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceRepository.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/service/PlaceCongestionQueryService.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/search/dto/SearchResultDTO.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/search/service/SearchQueryService.kt (3 hunks)
  • src/main/kotlin/busanVibe/busan/domain/search/util/SearchUtil.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/controller/UserAuthController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/controller/UserController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/converter/UserConverter.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/data/User.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/data/dto/UserLikesDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/data/dto/UserResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/data/dto/login/KakaoTokenResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/data/dto/login/KakaoUserInfoResponse.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/data/dto/login/TokenResponseDto.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/data/dto/login/UserLoginResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/repository/UserRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/service/UserCommandService.kt (4 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/service/UserQueryService.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/util/LoginRedirectUtil.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/global/apiPayload/code/status/ErrorStatus.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/global/config/security/JwtTokenProvider.kt (1 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ggamnunq ggamnunq merged commit 90bdfbd into main Aug 18, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants