Skip to content

[FEAT] 모임 V2 코드 리팩토링#165

Merged
LimdaeIl merged 1 commit intomainfrom
feat/refactor-group
Dec 23, 2025
Merged

[FEAT] 모임 V2 코드 리팩토링#165
LimdaeIl merged 1 commit intomainfrom
feat/refactor-group

Conversation

@LimdaeIl
Copy link
Collaborator

@LimdaeIl LimdaeIl commented Dec 23, 2025

📝 Pull Request

📌 PR 종류

해당하는 항목에 체크해주세요.

  • 기능 추가 (Feature)
  • 버그 수정 (Fix)
  • 문서 수정 (Docs)
  • 코드 리팩터링 (Refactor)
  • 테스트 추가 (Test)
  • 기타 변경 (Chore)

✨ 변경 내용

그룹 관련 코드(예외 처리 및 DTO 포함)를 리팩토링합니다.

  • 중앙 집중식 오류 관리를 위해 GroupErrorCode 열거형을 도입합니다.

  • 특정 그룹 관련 예외를 처리하도록 GlobalExceptionHandler를 업데이트합니다.

  • 그룹 관련 DTO 및 엔티티 참조를 정리하고 체계화합니다.

🔍 관련 이슈

🧪 테스트

변경된 기능에 대한 테스트 범위 또는 테스트 결과를 작성해주세요.

  • 유닛 테스트 추가 / 수정
  • 통합 테스트 검증
  • 수동 테스트 완료

🚨 확인해야 할 사항 (Checklist)

PR을 제출하기 전에 아래 항목들을 확인해주세요.

  • 코드 포매팅 완료
  • 불필요한 파일/코드 제거
  • 로직 검증 완료
  • 프로젝트 빌드 성공
  • 린트/정적 분석 통과 (해당 시)

🙋 기타 참고 사항

리뷰어가 참고하면 좋을 만한 추가 설명이 있다면 적어주세요.

Summary by CodeRabbit

릴리스 노트

  • Refactor
    • 모임 관리 작업에 대한 포괄적인 오류 처리 인프라 개선
    • 유효성 검사 및 그룹 운영 메시지 템플릿 확대
    • 코드 정리 및 형식 최적화

✏️ Tip: You can customize this high-level summary in your review settings.

그룹 관련 코드(예외 처리 및 DTO 포함)를 리팩토링합니다.

- 중앙 집중식 오류 관리를 위해 `GroupErrorCode` 열거형을 도입합니다.

- 특정 그룹 관련 예외를 처리하도록 `GlobalExceptionHandler`를 업데이트합니다.

- 그룹 관련 DTO 및 엔티티 참조를 정리하고 체계화합니다.
@LimdaeIl LimdaeIl self-assigned this Dec 23, 2025
Copilot AI review requested due to automatic review settings December 23, 2025 14:41
@LimdaeIl LimdaeIl added the ✨enhancement New feature or request label Dec 23, 2025
@LimdaeIl LimdaeIl moved this from Backlog to In progress in WeGo-Together Backend Dec 23, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

모임 V2 관련 예외 처리 및 DTO 리팩토링 작업으로, GroupErrorCode 열거형에 70개 이상의 이미지 검증, 권한 확인, 참여 승인 흐름 관련 새로운 상수를 추가하고, 각 DTO 및 record 파일의 불필요한 import를 제거하며 형식을 정리합니다.

Changes

Cohort / File(s) 요약
GroupErrorCode 열거형 확장
src/main/java/team/wego/wegobackend/group/domain/exception/GroupErrorCode.java
이미지 업로드 검증(IMAGE_UPLOAD_EXCEED, IMAGE_UPLOAD_FAILED 등), 권한 확인(NO_PERMISSION_TO_BAN, NO_PERMISSION_TO_KICK 등), 참여 승인/거절 흐름(CANNOT_APPROVE_SELF, GROUP_USER_STATUS_NOT_ALLOWED_TO_APPROVE 등), 태그 검증(TAG_EXCEED_MAX, TAG_DUPLICATED 등), 그룹 메타데이터 검증(GROUP_TITLE_REQUIRED, LOCATION_REQUIRED 등), Redis/선업로드 관련(PRE_UPLOADED_IMAGE_NOT_FOUND, REDIS_SAVE_FAILED 등), 상태 전이 검증(GROUP_STATUS_TRANSFER_IMPOSSIBLE 등) 관련 70개 이상의 새로운 enum 상수 추가
DTO 및 Projection Record 정리
src/main/java/team/wego/wegobackend/group/v2/application/dto/request/UpdateGroupImageItemV2Request.java, src/main/java/team/wego/wegobackend/group/v2/application/dto/response/UpdateGroupV2Response.java, src/main/java/team/wego/wegobackend/group/v2/infrastructure/querydsl/projection/GroupListRow.java, src/main/java/team/wego/wegobackend/group/v2/infrastructure/querydsl/projection/MyGroupListRow.java
Compact record 형식에서 명시적 empty body 형식으로 변환(문법만 변경, 기능 없음)
Import 정리 및 팩토리 메서드 추가
src/main/java/team/wego/wegobackend/group/v2/application/dto/common/Address.java
불필요한 import 제거 및 from(GroupV2Address) 정적 팩토리 메서드 추가
import 정리
src/main/java/team/wego/wegobackend/group/v2/application/dto/common/GroupImageItem.java, src/main/java/team/wego/wegobackend/group/v2/application/dto/request/UpdateGroupV2Request.java, src/main/java/team/wego/wegobackend/group/v2/application/dto/response/GetGroupV2Response.java, src/main/java/team/wego/wegobackend/group/v2/application/dto/response/PreUploadGroupImageV2Response.java, src/main/java/team/wego/wegobackend/group/v2/application/dto/response/GetBanTargetsResponse.java
불필요한 import 제거 및 형식 정리(줄바꿈, 후행 공백 등)
예외 처리 포매팅
src/main/java/team/wego/wegobackend/common/exception/GlobalExceptionHandler.java
handleDataIntegrity 메서드 내 AppException 생성자 호출을 여러 줄로 분할(기능 변화 없음)
메서드 정리
src/main/java/team/wego/wegobackend/group/application/service/v1/GroupService.java
불필요한 빈 줄 제거(기능 변화 없음)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 enum 상수 가득 담고,
import 불필요한 것 다 빼고,
record 형식 맞춰 정돈했네~ 🌟
깔끔한 코드의 재탄생,🎉
모임 V2 더욱 튼튼해라! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/refactor-group

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 67c1ee3 and 51feecb.

📒 Files selected for processing (13)
  • src/main/java/team/wego/wegobackend/common/exception/GlobalExceptionHandler.java
  • src/main/java/team/wego/wegobackend/group/application/service/v1/GroupService.java
  • src/main/java/team/wego/wegobackend/group/domain/exception/GroupErrorCode.java
  • src/main/java/team/wego/wegobackend/group/v2/application/dto/common/Address.java
  • src/main/java/team/wego/wegobackend/group/v2/application/dto/common/GroupImageItem.java
  • src/main/java/team/wego/wegobackend/group/v2/application/dto/request/UpdateGroupImageItemV2Request.java
  • src/main/java/team/wego/wegobackend/group/v2/application/dto/request/UpdateGroupV2Request.java
  • src/main/java/team/wego/wegobackend/group/v2/application/dto/response/GetBanTargetsResponse.java
  • src/main/java/team/wego/wegobackend/group/v2/application/dto/response/GetGroupV2Response.java
  • src/main/java/team/wego/wegobackend/group/v2/application/dto/response/PreUploadGroupImageV2Response.java
  • src/main/java/team/wego/wegobackend/group/v2/application/dto/response/UpdateGroupV2Response.java
  • src/main/java/team/wego/wegobackend/group/v2/infrastructure/querydsl/projection/GroupListRow.java
  • src/main/java/team/wego/wegobackend/group/v2/infrastructure/querydsl/projection/MyGroupListRow.java

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@LimdaeIl LimdaeIl merged commit df6f4b8 into main Dec 23, 2025
4 of 5 checks passed
@LimdaeIl LimdaeIl deleted the feat/refactor-group branch December 23, 2025 14:41
@github-project-automation github-project-automation bot moved this from In progress to Done in WeGo-Together Backend Dec 23, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors group-related code focusing on code organization and formatting improvements. The main change is the reorganization of the GroupErrorCode enum with better categorization and consistent formatting across DTOs and service classes.

  • Reorganizes GroupErrorCode enum with logical grouping (image validation, ban/kick operations, join approval, etc.)
  • Removes unused imports from DTO classes
  • Applies consistent formatting to record classes

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
GroupErrorCode.java Reorganized error codes into logical categories with improved formatting and consistent messaging
MyGroupListRow.java Formatting update to record declaration
GroupListRow.java Formatting update to record declaration
UpdateGroupV2Response.java Formatting update to record declaration
PreUploadGroupImageV2Response.java Formatting update to record declaration
GetGroupV2Response.java Line break adjustment for better readability
GetBanTargetsResponse.java Formatting update to record declaration
UpdateGroupV2Request.java Removed unused validation constraint imports (Min, Max)
UpdateGroupImageItemV2Request.java Formatting update to record declaration
GroupImageItem.java Removed unused imports (GroupImageV2VariantType, ImageV2Format)
Address.java Removed unused import (GetGroupV2Response) and added blank line for consistency
GroupService.java Trailing whitespace cleanup
GlobalExceptionHandler.java Line break adjustment for better readability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai bot mentioned this pull request Feb 1, 2026
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEAT] 모임 V2 코드 리팩토링

1 participant