Skip to content

Conversation

@frombunny
Copy link
Member

@frombunny frombunny commented May 28, 2025

🔍 관련 이슈


✅ 작업 분류

  • 버그 수정
  • 신규 기능
  • 프로젝트 구조 변경
  • 코드 리팩토링
  • 기능 수정

✨ 작업 내용

  1. 사용자 프로필 수정 로직 수정
  2. 사진 필드에 사용자 프로필 사진 넣도록 개선
  3. 문서 이름 저장 로직 개선
  4. 필드 라벨명 개선

✅ 체크리스트

  • 코드가 컴파일 및 빌드됨
  • 모든 테스트가 통과함
  • 관련 문서가 업데이트됨
  • 코드 리뷰가 수행됨
  • 커밋 메시지를 확인함

Summary by CodeRabbit

  • 신규 기능

    • 사용자 정보 수정 시 프로필 이미지를 파일로 업로드할 수 있도록 개선되었습니다.
    • 사용자 정보 수정 후, 변경된 주소와 프로필 이미지 URL을 응답으로 제공합니다.
    • 문서 타입별 한글 폴더명이 자동으로 지정됩니다.
    • PDF 내 인적 사진 필드에 사용자의 프로필 이미지가 삽입됩니다.
  • 버그 수정

    • 일부 필드 라벨 및 매핑이 더 명확하고 일관성 있게 개선되었습니다.
  • 문서화

    • 사용자 정보 수정 요청 및 응답 데이터 구조가 변경되었습니다. (프로필 이미지 URL 제거, 응답 객체 추가)
  • 리팩터링

    • 불필요한 서비스 필드 및 의존성이 제거되어 코드가 간결해졌습니다.
    • 필드 라벨에 카테고리명이 추가되어 가독성이 향상되었습니다.

@frombunny frombunny self-assigned this May 28, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 28, 2025

Walkthrough

이번 변경에서는 사용자 정보 수정 API의 시그니처와 데이터 흐름이 대폭 개편되었습니다. 프로필 이미지 업로드를 위한 멀티파트 요청 처리, 사용자 정보 응답 DTO 신설, 필드 매퍼의 라벨 개선, 문서 타입별 한글 폴더명 제공, 프로필 사진 필드의 PDF 렌더링 및 플라스크 서비스 연동 등이 반영되었습니다.

Changes

파일/경로 요약 변경 내용 요약
.../document/entity/enums/DocumentType.java 각 문서 타입별 한글 폴더명을 반환하는 getKoreanFolderName() 메서드 추가
.../document/service/DocumentServiceImpl.java PDF 파일명 처리 및 한글 폴더명 활용, 로그 추가, 불필요 필드 제거
.../document/web/controller/DocumentController.java flaskService, pdfService, s3Service 필드 제거
.../user/entity/User.java modifyUserInfo 메서드에 profileImageUrl 파라미터 추가, 직접 프로필 이미지 URL 세팅
.../user/service/UserService.java modifyUserInfo 메서드: 반환형을 ModifyUserInfoRes로, 파일 파라미터 추가, IOException 명시
.../user/service/UserServiceImpl.java modifyUserInfo 메서드: 파일 업로드 및 URL 연동, 반환형 변경, S3Service 의존성 추가
.../user/web/controller/UserController.java 사용자 정보 수정 엔드포인트: 멀티파트(파일+JSON) 요청 처리, 반환형 및 파라미터 변경, 예외 명시
.../user/web/dto/ModifyUserInfoReq.java profileImageUrl 필드 제거, address만 유지
.../user/web/dto/ModifyUserInfoRes.java 신규 DTO 레코드: address, imgUrl 필드 및 from(User) 팩토리 메서드 추가
.../external/service/PdfService.java "B-PERSONAL-PHOTO" 필드에 대해 이미지 렌더링 로직 추가, URL에서 이미지 로드 및 박스 내 배치
.../flask/mapper/FieldLabelMapper.java 각 필드 라벨에 카테고리 접두사 추가, 일부 라벨 한글 및 띄어쓰기 개선
.../flask/mapper/FieldTargetMapper.java "B-PERSONAL-PHOTO" 매핑 값을 "-FIELD" 없는 값으로 변경
.../flask/service/FlaskService.java "B-PERSONAL-PHOTO" 필드 지원: 사용자 프로필 이미지 URL 반환 및 필드 처리 로직에 예외 추가

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant UserController
    participant UserService
    participant S3Service
    participant User

    Client->>UserController: multipart/form-data(file, data)
    UserController->>UserService: modifyUserInfo(data, file, userPrincipal)
    UserService->>S3Service: upload(file)
    S3Service-->>UserService: profileImageUrl
    UserService->>User: modifyUserInfo(data, profileImageUrl)
    User-->>UserService: (User updated)
    UserService-->>UserController: ModifyUserInfoRes
    UserController-->>Client: SuccessResponse<ModifyUserInfoRes>
Loading

Poem

(\(\
( -.-)
o_(")(")

오늘은 토끼가 기뻐 뛰네
사진 첨부, 주소도 새로워졌지!
한글 폴더명도 척척,
프로필 사진은 PDF에 쏙!
변화의 바람, 귀 쫑긋 세워
토끼 개발자, 오늘도 힘내요! 🥕


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f6cffda and f05bddf.

📒 Files selected for processing (13)
  • src/main/java/Sprout_Squad/EyeOn/domain/document/entity/enums/DocumentType.java (1 hunks)
  • src/main/java/Sprout_Squad/EyeOn/domain/document/service/DocumentServiceImpl.java (3 hunks)
  • src/main/java/Sprout_Squad/EyeOn/domain/document/web/controller/DocumentController.java (0 hunks)
  • src/main/java/Sprout_Squad/EyeOn/domain/user/entity/User.java (1 hunks)
  • src/main/java/Sprout_Squad/EyeOn/domain/user/service/UserService.java (1 hunks)
  • src/main/java/Sprout_Squad/EyeOn/domain/user/service/UserServiceImpl.java (3 hunks)
  • src/main/java/Sprout_Squad/EyeOn/domain/user/web/controller/UserController.java (2 hunks)
  • src/main/java/Sprout_Squad/EyeOn/domain/user/web/dto/ModifyUserInfoReq.java (1 hunks)
  • src/main/java/Sprout_Squad/EyeOn/domain/user/web/dto/ModifyUserInfoRes.java (1 hunks)
  • src/main/java/Sprout_Squad/EyeOn/global/external/service/PdfService.java (2 hunks)
  • src/main/java/Sprout_Squad/EyeOn/global/flask/mapper/FieldLabelMapper.java (2 hunks)
  • src/main/java/Sprout_Squad/EyeOn/global/flask/mapper/FieldTargetMapper.java (1 hunks)
  • src/main/java/Sprout_Squad/EyeOn/global/flask/service/FlaskService.java (2 hunks)
💤 Files with no reviewable changes (1)
  • src/main/java/Sprout_Squad/EyeOn/domain/document/web/controller/DocumentController.java

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

@frombunny frombunny linked an issue May 28, 2025 that may be closed by this pull request
5 tasks
@frombunny frombunny merged commit ba1df52 into dev May 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: 성능 개선

2 participants