Skip to content

Feat: 주점 결제 정보 CRUD 및 예외처리 추가 #105

Merged
Jjiggu merged 17 commits into
developfrom
feature/#104-Payment-Method
Jul 11, 2025
Merged

Feat: 주점 결제 정보 CRUD 및 예외처리 추가 #105
Jjiggu merged 17 commits into
developfrom
feature/#104-Payment-Method

Conversation

@Jjiggu

@Jjiggu Jjiggu commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

작업 요약

주점 결제 정보 CRUD 및 예외처리 추가

Issue Link

#104

문제점 및 어려움

해결 방안

Reference

Summary by CodeRabbit

  • 신규 기능

    • 관리자와 사용자 API에 매장 결제 정보(토스, 카카오페이, 네이버페이 URL) 생성, 조회, 수정 기능이 추가되었습니다.
    • 관리자용 결제 정보 생성, 수정, 조회 엔드포인트가 제공됩니다.
    • 사용자는 매장 ID로 결제 정보를 조회할 수 있습니다.
  • 버그 수정

    • 일부 컨트롤러 파라미터의 공백 및 import 문이 정비되었습니다.
  • 예외 및 오류 메시지

    • 매장 결제 관련 상세 예외 및 오류 메시지가 추가되었습니다.
  • 기타

    • 백엔드 이슈 템플릿이 삭제되었습니다.

@Jjiggu Jjiggu self-assigned this Jul 11, 2025
@Jjiggu Jjiggu added the enhancement New feature or request label Jul 11, 2025
@coderabbitai

coderabbitai Bot commented Jul 11, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

이 변경사항은 "StorePayment" 기능의 전체적인 도입 및 관련 CRUD(생성, 조회, 수정) API, 서비스, DTO, 예외, JPA 엔티티, 저장소를 백엔드와 유저 API에 추가합니다. 또한, 기존 백엔드 이슈 템플릿을 삭제하고 일부 코드 스타일 및 import 구문을 정리하였습니다.

Changes

파일/경로 그룹 변경 요약
.github/ISSUE_TEMPLATE/백엔드-이슈.md 백엔드 이슈 템플릿 파일 삭제
nowait-app-admin-api/.../StoreController.java
nowait-app-admin-api/.../StoreServiceImpl.java
파라미터 리스트 공백 추가 및 import 구문 정리 (로직 변화 없음)
nowait-app-admin-api/.../storePayment/controller/StorePaymentController.java 관리자용 StorePayment REST 컨트롤러 신규 추가 (생성, 조회, 수정 엔드포인트)
nowait-app-admin-api/.../storePayment/dto/StorePaymentCreateRequest.java
nowait-app-admin-api/.../storePayment/dto/StorePaymentCreateResponse.java
nowait-app-admin-api/.../storePayment/dto/StorePaymentReadDto.java
nowait-app-admin-api/.../storePayment/dto/StorePaymentUpdateRequest.java
StorePayment 관련 생성/조회/수정 DTO 신규 추가
nowait-app-admin-api/.../storePayment/service/StorePaymentService.java
nowait-app-admin-api/.../storePayment/service/StorePaymentServiceImpl.java
StorePayment 서비스 인터페이스 및 구현체 신규 추가 (생성, 조회, 수정, 권한 검증 포함)
nowait-common/.../exception/ErrorMessage.java StorePayment 관련 에러 메시지 Enum 7종 추가
nowait-domain/domain-core-rdb/.../storePayment/entity/StorePayment.java StorePayment JPA 엔티티 신규 추가 (필드, 빌더, 부분 업데이트 메서드 포함)
nowait-domain/domain-core-rdb/.../storePayment/repository/StorePaymentRepository.java StorePaymentRepository(JpaRepository) 신규 추가 및 storeId로 조회 메서드 구현
nowait-domain/domain-core-rdb/.../storePayment/exception/StorePaymentNotFoundException.java
nowait-domain/domain-core-rdb/.../storePayment/exception/StorePaymentParamEmptyException.java
nowait-domain/domain-core-rdb/.../storePayment/exception/StorePaymentUpdateUnauthorizedException.java
nowait-domain/domain-core-rdb/.../storePayment/exception/StorePaymentViewUnauthorizedException.java
nowait-domain/domain-core-rdb/.../storePayment/exception/StorePaymentAlreadyExistsException.java
nowait-domain/domain-core-rdb/.../storePayment/exception/StorePaymentCreationUnauthorizedException.java
StorePayment 관련 커스텀 예외 클래스 6종 신규 추가
nowait-app-user-api/.../storepayment/controller/StorePaymentController.java 유저용 StorePayment 조회 컨트롤러 신규 추가 (storeId 기반 조회)
nowait-app-user-api/.../storepayment/dto/StorePaymentReadDto.java 유저용 StorePayment 조회 DTO 신규 추가
nowait-app-user-api/.../storepayment/service/StorePaymentService.java
nowait-app-user-api/.../storepayment/service/StorePaymentServiceImpl.java
유저용 StorePayment 서비스 인터페이스 및 구현체 신규 추가 (storeId 기반 단건 조회)

Sequence Diagram(s)

sequenceDiagram
    participant AdminAPI as Admin API
    participant StorePaymentController
    participant StorePaymentService
    participant StorePaymentRepository
    participant DB

    AdminAPI->>StorePaymentController: POST /admin/store-payments/create (request, memberDetails)
    StorePaymentController->>StorePaymentService: createStorePayment(request, memberDetails)
    StorePaymentService->>StorePaymentRepository: save(StorePayment)
    StorePaymentRepository->>DB: Insert StorePayment
    StorePaymentRepository-->>StorePaymentService: StorePayment Entity
    StorePaymentService-->>StorePaymentController: StorePaymentCreateResponse
    StorePaymentController-->>AdminAPI: 201 Created + ApiUtils.success(response)

    AdminAPI->>StorePaymentController: GET /admin/store-payments (memberDetails)
    StorePaymentController->>StorePaymentService: getStorePaymentByStoreId(memberDetails)
    StorePaymentService->>StorePaymentRepository: findByStoreId(storeId)
    StorePaymentRepository-->>StorePaymentService: StorePayment Entity
    StorePaymentService-->>StorePaymentController: StorePaymentReadDto
    StorePaymentController-->>AdminAPI: 200 OK + ApiUtils.success(response)

    AdminAPI->>StorePaymentController: PATCH /admin/store-payments/update (request, memberDetails)
    StorePaymentController->>StorePaymentService: updateStorePayment(request, memberDetails)
    StorePaymentService->>StorePaymentRepository: findByStoreId(storeId)
    StorePaymentRepository-->>StorePaymentService: StorePayment Entity
    StorePaymentService->>StorePaymentRepository: save(StorePayment)
    StorePaymentRepository-->>StorePaymentService: StorePayment Entity
    StorePaymentService-->>StorePaymentController: StorePaymentReadDto
    StorePaymentController-->>AdminAPI: 200 OK + ApiUtils.success(response)
Loading
sequenceDiagram
    participant UserAPI as User API
    participant StorePaymentController
    participant StorePaymentService
    participant StorePaymentRepository
    participant DB

    UserAPI->>StorePaymentController: GET /v1/store-payments/{storeId}
    StorePaymentController->>StorePaymentService: getStorePaymentByStoreId(storeId)
    StorePaymentService->>StorePaymentRepository: findByStoreId(storeId)
    StorePaymentRepository-->>StorePaymentService: StorePayment Entity
    StorePaymentService-->>StorePaymentController: StorePaymentReadDto
    StorePaymentController-->>UserAPI: 200 OK + ApiUtils.success(response)
Loading

Suggested reviewers

  • HyemIin

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 71455db and 41d3068.

📒 Files selected for processing (3)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/controller/StorePaymentController.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentServiceImpl.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/controller/StorePaymentController.java (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 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? Create a ticket on our support page 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 docstrings to generate docstrings for this 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.

@github-actions github-actions Bot requested a review from HyemIin July 11, 2025 02:59

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 13

🔭 Outside diff range comments (1)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentReadDto.java (1)

1-33: 코드 중복을 제거하세요.

이 클래스는 사용자 API의 StorePaymentReadDto와 동일합니다. 공통 모듈로 이동하여 중복을 제거하는 것을 고려해보세요.

공통 DTO를 위한 별도 모듈 생성을 고려하거나, 기존 공통 모듈에 배치하여 admin과 user API 모두에서 참조하도록 리팩토링할 수 있습니다.

🧹 Nitpick comments (11)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/service/StoreServiceImpl.java (1)

5-5: 사용되지 않는 import 제거 필요

현재 파일에서 @AuthenticationPrincipal 어노테이션을 사용하지 않는 것으로 보입니다. 불필요한 import는 제거해주세요.

-import org.springframework.security.core.annotation.AuthenticationPrincipal;
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/controller/StoreController.java (1)

92-92: 포맷팅 일관성 유지 필요

92번째 줄에서도 쉼표 뒤에 공백을 추가하여 포맷팅을 일관성 있게 유지해주세요.

-					storeService.deleteStore(storeId,memberDetails)
+					storeService.deleteStore(storeId, memberDetails)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateRequest.java (1)

5-5: @NotNull import가 사용되지 않습니다.

jakarta.validation.constraints.NotNull을 import했지만 필드에 적용되지 않았습니다.

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentService.java (1)

9-14: Delete 메서드가 누락되었습니다.

CRUD 작업 중 삭제(Delete) 기능이 인터페이스에 정의되어 있지 않습니다. 의도적으로 제외된 것인지 확인이 필요합니다.

삭제 기능이 필요하다면 구현을 도와드릴 수 있습니다. 새로운 이슈를 생성하시겠습니까?

nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/entity/StorePayment.java (2)

43-50: 불필요한 커스텀 생성자입니다.

Lombok의 @SuperBuilder@AllArgsConstructor가 이미 있으므로, 이 커스텀 생성자는 중복됩니다. 제거하는 것이 좋습니다.

이 생성자를 제거하면 코드가 더 깔끔해집니다.


34-35: 띄어쓰기가 누락되었습니다.

length 속성 앞에 공백이 없습니다.

-@Column(name = "toss_url",length = 500)
+@Column(name = "toss_url", length = 500)
nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/controller/StorePaymentController.java (2)

5-5: 사용하지 않는 import가 있습니다.

@AuthenticationPrincipalMemberDetails는 이 컨트롤러에서 사용되지 않습니다.

-import org.springframework.security.core.annotation.AuthenticationPrincipal;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;

 import com.nowait.applicationuser.storePayment.service.StorePaymentService;
 import com.nowait.common.api.ApiUtils;
-import com.nowait.domaincorerdb.user.entity.MemberDetails;

Also applies to: 13-13


34-34: @Valid@PathVariable에 적용되지 않습니다.

@Valid는 request body나 form data 검증용이며, path variable에는 효과가 없습니다.

-public ResponseEntity<?> getStorePaymentByStoreId(@Valid @PathVariable Long storeId) {
+public ResponseEntity<?> getStorePaymentByStoreId(@PathVariable Long storeId) {
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentServiceImpl.java (1)

83-83: 이미 관리되는 엔티티를 다시 저장할 필요가 없습니다.

JPA의 dirty checking 메커니즘에 의해 트랜잭션이 커밋될 때 자동으로 변경사항이 저장됩니다. 명시적인 save() 호출은 불필요합니다.

 storePayment.updatePaymentMethodUrl(
     request.getTossUrl(),
     request.getKakaoPayUrl(),
     request.getNaverPayUrl()
 );
-storePaymentRepository.save(storePayment);
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/controller/StorePaymentController.java (2)

39-39: 타입 안전성을 위해 ResponseEntity 제네릭 타입 지정 권장

모든 엔드포인트에서 ResponseEntity<?>를 사용하고 있어 타입 안전성이 떨어집니다. 구체적인 응답 타입을 지정하는 것이 좋습니다.

-public ResponseEntity<?> createStorePayment(@Valid @RequestBody StorePaymentCreateRequest request, @AuthenticationPrincipal MemberDetails memberDetails) {
+public ResponseEntity<ApiUtils.ApiResult<StorePaymentCreateResponse>> createStorePayment(@Valid @RequestBody StorePaymentCreateRequest request, @AuthenticationPrincipal MemberDetails memberDetails) {

-public ResponseEntity<?> getStorePaymentByStoreId(@AuthenticationPrincipal MemberDetails memberDetails) {
+public ResponseEntity<ApiUtils.ApiResult<StorePaymentReadDto>> getStorePaymentByStoreId(@AuthenticationPrincipal MemberDetails memberDetails) {

-public ResponseEntity<?> updateStorePayment(@Valid @RequestBody StorePaymentUpdateRequest request, @AuthenticationPrincipal MemberDetails memberDetails) {
+public ResponseEntity<ApiUtils.ApiResult<StorePaymentUpdateResponse>> updateStorePayment(@Valid @RequestBody StorePaymentUpdateRequest request, @AuthenticationPrincipal MemberDetails memberDetails) {

Also applies to: 54-54, 67-67


29-29: 일관성 있는 URL 매핑 패턴 고려

현재 엔드포인트들이 서로 다른 URL 패턴을 사용하고 있습니다:

  • POST /admin/store-payments/create
  • GET /admin/store-payments
  • PATCH /admin/store-payments/update

REST API 관례에 따라 더 일관성 있는 패턴을 고려해보세요.

-@PostMapping("/create")
+@PostMapping

-@PatchMapping("/update")
+@PatchMapping

또는 리소스 중심 접근법:

-@PostMapping("/create")
+@PostMapping

-@GetMapping()
+@GetMapping("/{storeId}")

-@PatchMapping("/update")
+@PatchMapping("/{storeId}")

Also applies to: 36-36, 51-51, 64-64

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3d5da18 and f4ea011.

📒 Files selected for processing (22)
  • .github/ISSUE_TEMPLATE/백엔드-이슈.md (0 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/controller/StoreController.java (2 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/service/StoreServiceImpl.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/controller/StorePaymentController.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateRequest.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateResponse.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentReadDto.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentUpdateRequest.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentService.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentServiceImpl.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/controller/StorePaymentController.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/dto/StorePaymentReadDto.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/service/StorePaymentService.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/service/StorePaymentServiceImpl.java (1 hunks)
  • nowait-common/src/main/java/com/nowait/common/exception/ErrorMessage.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/entity/StorePayment.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentCreationUnauthorized.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentNotFoundException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentParamEmptyException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentUpdateUnauthorizedException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentViewUnauthorizedException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/repository/StorePaymentRepository.java (1 hunks)
💤 Files with no reviewable changes (1)
  • .github/ISSUE_TEMPLATE/백엔드-이슈.md
🧰 Additional context used
🧬 Code Graph Analysis (3)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateResponse.java (1)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateRequest.java (1)
  • Getter (10-27)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentServiceImpl.java (6)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/service/StoreServiceImpl.java (1)
  • Service (32-126)
nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/service/StorePaymentServiceImpl.java (1)
  • Service (13-29)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentCreationUnauthorized.java (1)
  • StorePaymentCreationUnauthorized (5-10)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentParamEmptyException.java (1)
  • StorePaymentParamEmptyException (5-9)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentUpdateUnauthorizedException.java (1)
  • StorePaymentUpdateUnauthorizedException (5-9)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentViewUnauthorizedException.java (1)
  • StorePaymentViewUnauthorizedException (5-9)
nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/service/StorePaymentServiceImpl.java (2)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentServiceImpl.java (1)
  • Service (26-87)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentParamEmptyException.java (1)
  • StorePaymentParamEmptyException (5-9)
🔇 Additional comments (12)
nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/service/StorePaymentService.java (1)

5-7: 서비스 인터페이스 구조 양호

메서드 시그니처가 명확하고 네이밍이 일관성 있게 작성되었습니다.

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/controller/StoreController.java (1)

57-57: 포맷팅 개선 양호

매개변수 목록의 일관성 있는 포맷팅 개선이 잘 되었습니다.

Also applies to: 87-87

nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentParamEmptyException.java (1)

5-9: 예외 클래스 구조 양호

매개변수 검증용 예외 클래스가 표준적인 구조로 잘 작성되었습니다. 클래스명도 Exception으로 끝나는 명명 규칙을 잘 따르고 있습니다.

nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentViewUnauthorizedException.java (1)

5-9: 예외 클래스 구현이 올바릅니다.

예외 클래스명과 에러 메시지가 일치하며, 표준적인 RuntimeException 상속 구조를 따르고 있습니다.

nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentUpdateUnauthorizedException.java (1)

5-9: 예외 클래스 구현이 올바릅니다.

예외 클래스명과 에러 메시지가 일치하며, 표준적인 RuntimeException 상속 구조를 따르고 있습니다.

nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/repository/StorePaymentRepository.java (1)

10-13: 표준적인 Spring Data JPA 리포지토리 구현입니다.

JpaRepository 상속과 메서드 네이밍 규칙을 올바르게 따르고 있으며, Optional 반환으로 null 안전성을 보장하고 있습니다.

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateRequest.java (1)

19-26: toEntity 메서드 구현이 깔끔합니다.

Builder 패턴을 사용하여 Entity 변환을 깔끔하게 구현했습니다.

nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/dto/StorePaymentReadDto.java (1)

1-33: 구현이 올바르게 되었습니다.

표준 DTO 패턴을 따르고 있으며, fromEntity 정적 팩토리 메서드가 올바르게 구현되어 있습니다.

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentUpdateRequest.java (1)

1-17: 구현이 적절합니다.

업데이트 요청을 위한 표준 DTO 패턴을 잘 따르고 있습니다.

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateResponse.java (1)

1-34: 올바른 구현입니다.

생성 응답을 위한 표준 DTO 패턴을 잘 따르고 있으며, fromEntity 메서드가 적절히 구현되어 있습니다.

nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/service/StorePaymentServiceImpl.java (1)

19-28: 인증 없이 조회가 가능한 구조입니다.

현재 구현에서는 storeId만 알면 누구나 결제 정보를 조회할 수 있습니다. 결제 URL과 같은 민감한 정보가 포함되어 있으므로, 적절한 인증/인가 검증이 필요할 수 있습니다.

관리자 API와 달리 사용자 API에서 인증 없이 결제 정보 조회를 허용하는 것이 의도된 설계인지 확인이 필요합니다.

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/controller/StorePaymentController.java (1)

27-35: 코드 구조가 Spring Boot 모범 사례를 잘 따르고 있습니다

클래스 선언과 의존성 주입 구조가 적절하게 구현되어 있습니다:

  • 적절한 Swagger 문서화 어노테이션
  • 생성자 주입을 통한 의존성 주입
  • 로깅을 위한 Slf4j 사용
  • 올바른 Spring 어노테이션 사용

@@ -0,0 +1,7 @@
package com.nowait.applicationuser.storePayment.service;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

패키지명 명명 규칙 개선 필요

Java 패키지명 규칙에 따라 storePayment보다는 storepayment(모두 소문자)를 사용하는 것이 좋습니다.

-package com.nowait.applicationuser.storePayment.service;
+package com.nowait.applicationuser.storepayment.service;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
package com.nowait.applicationuser.storePayment.service;
package com.nowait.applicationuser.storepayment.service;
🤖 Prompt for AI Agents
In
nowait-app-user-api/src/main/java/com/nowait/applicationuser/storePayment/service/StorePaymentService.java
at line 1, the package name 'storePayment' uses mixed case which violates Java
package naming conventions. Rename the package directory and update the package
declaration to use all lowercase letters as 'storepayment' to comply with
standard Java package naming rules.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 9

♻️ Duplicate comments (1)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentNotFoundException.java (1)

5-9: 잘못된 에러 메시지 사용으로 인한 크리티컬 이슈입니다.

이전 리뷰에서 이미 지적된 문제가 여전히 수정되지 않았습니다. StorePaymentNotFoundException인데 STORE_PAYMENT_PARAMETER_EMPTY 메시지를 사용하고 있어 클라이언트에게 잘못된 에러 정보를 전달하게 됩니다.

즉시 다음과 같이 수정해야 합니다:

public class StorePaymentNotFoundException extends RuntimeException {
	public StorePaymentNotFoundException() {
-		super(ErrorMessage.STORE_PAYMENT_PARAMETER_EMPTY.getMessage());
+		super(ErrorMessage.STORE_PAYMENT_NOT_FOUND.getMessage());
	}
}
🧹 Nitpick comments (2)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentCreationUnauthorizedException.java (1)

6-6: 불필요한 빈 줄을 제거하세요.

클래스 내부의 불필요한 빈 줄을 제거하여 코드를 더 깔끔하게 만들 수 있습니다.

public class StorePaymentCreationUnauthorizedException extends RuntimeException {
-
	public StorePaymentCreationUnauthorizedException() {
nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/controller/StorePaymentController.java (1)

29-29: @GetMapping에서 불필요한 괄호를 제거하세요.

이중 괄호는 불필요하며 가독성을 해칠 수 있습니다.

-	@GetMapping(("/{storeId}"))
+	@GetMapping("/{storeId}")
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f4ea011 and 71455db.

📒 Files selected for processing (18)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/controller/StorePaymentController.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateRequest.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateResponse.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentReadDto.java (1 hunks)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentServiceImpl.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/controller/StorePaymentController.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/dto/StorePaymentReadDto.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/service/StorePaymentService.java (1 hunks)
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/service/StorePaymentServiceImpl.java (1 hunks)
  • nowait-common/src/main/java/com/nowait/common/exception/ErrorMessage.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/entity/StorePayment.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentAlreadyExistsException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentCreationUnauthorizedException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentNotFoundException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentParamEmptyException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentUpdateUnauthorizedException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentViewUnauthorizedException.java (1 hunks)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/repository/StorePaymentRepository.java (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateRequest.java
  • nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/dto/StorePaymentReadDto.java
🚧 Files skipped from review as they are similar to previous changes (9)
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentParamEmptyException.java
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/repository/StorePaymentRepository.java
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentUpdateUnauthorizedException.java
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentViewUnauthorizedException.java
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentReadDto.java
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/dto/StorePaymentCreateResponse.java
  • nowait-common/src/main/java/com/nowait/common/exception/ErrorMessage.java
  • nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/entity/StorePayment.java
  • nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/controller/StorePaymentController.java
🧰 Additional context used
🧬 Code Graph Analysis (2)
nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/service/StorePaymentServiceImpl.java (1)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentParamEmptyException.java (1)
  • StorePaymentParamEmptyException (5-9)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentServiceImpl.java (6)
nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/store/service/StoreServiceImpl.java (1)
  • Service (32-126)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentAlreadyExistsException.java (1)
  • StorePaymentAlreadyExistsException (5-9)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentCreationUnauthorizedException.java (1)
  • StorePaymentCreationUnauthorizedException (5-10)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentParamEmptyException.java (1)
  • StorePaymentParamEmptyException (5-9)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentUpdateUnauthorizedException.java (1)
  • StorePaymentUpdateUnauthorizedException (5-9)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentViewUnauthorizedException.java (1)
  • StorePaymentViewUnauthorizedException (5-9)
🔇 Additional comments (7)
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentAlreadyExistsException.java (1)

5-9: 예외 클래스 구현이 올바릅니다.

RuntimeException을 상속하고 적절한 에러 메시지를 사용하는 표준적인 예외 클래스 구현입니다.

nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentCreationUnauthorizedException.java (1)

7-9: 예외 클래스 구현이 올바릅니다.

적절한 에러 메시지를 사용하는 표준적인 예외 클래스 구현입니다.

nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/service/StorePaymentService.java (1)

5-7: 서비스 인터페이스 설계가 우수합니다.

명확한 메서드 시그니처와 적절한 반환 타입을 사용한 깔끔한 인터페이스 설계입니다. 단일 책임 원칙을 잘 따르고 있습니다.

nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/controller/StorePaymentController.java (2)

20-27: 컨트롤러 설정이 잘 구성되어 있습니다.

OpenAPI 문서화 어노테이션과 Spring Boot 표준 패턴을 잘 따르고 있습니다. 의존성 주입과 로깅 설정도 적절합니다.


33-40: 응답 처리 로직이 표준 패턴을 잘 따릅니다.

ApiUtils.success를 사용한 표준화된 응답 래핑과 적절한 HTTP 상태 코드 사용이 좋습니다.

nowait-app-user-api/src/main/java/com/nowait/applicationuser/storepayment/service/StorePaymentServiceImpl.java (1)

19-28: 구현이 깔끔하고 모범 사례를 잘 따르고 있습니다.

서비스 메서드가 적절한 검증, 트랜잭션 처리, 예외 처리를 수행하고 있습니다. 특히 읽기 전용 트랜잭션 어노테이션 사용과 일관된 예외 타입 사용이 좋습니다.

nowait-app-admin-api/src/main/java/com/nowait/applicationadmin/storePayment/service/StorePaymentServiceImpl.java (1)

42-44: 중복 생성 방지 로직이 잘 구현되었습니다.

이전 리뷰 피드백이 반영되어 이미 존재하는 결제 정보에 대한 중복 생성을 적절히 방지하고 있습니다.

@@ -0,0 +1,9 @@
package com.nowait.domaincorerdb.storepayment.exception;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

패키지 이름 불일치 문제가 있습니다.

파일 경로는 storePayment (PascalCase)를 사용하지만 패키지 선언은 storepayment (camelCase)를 사용하고 있습니다. 일관성을 위해 통일해야 합니다.

다음 중 하나로 수정하는 것을 권장합니다:

-package com.nowait.domaincorerdb.storepayment.exception;
+package com.nowait.domaincorerdb.storePayment.exception;

또는 디렉토리 구조를 storepayment로 변경하세요.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
package com.nowait.domaincorerdb.storepayment.exception;
-package com.nowait.domaincorerdb.storepayment.exception;
+package com.nowait.domaincorerdb.storePayment.exception;
🤖 Prompt for AI Agents
In
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentAlreadyExistsException.java
at line 1, the package declaration uses 'storepayment' in lowercase, which does
not match the directory name 'storePayment' with uppercase P. To fix this,
update the package declaration to use 'storePayment' with the same casing as the
directory, or alternatively rename the directory to 'storepayment' to match the
package declaration. Ensure the package name and directory structure are
consistent.

@@ -0,0 +1,9 @@
package com.nowait.domaincorerdb.storepayment.exception;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

패키지 이름 불일치 문제가 있습니다.

파일 경로는 storePayment (PascalCase)를 사용하지만 패키지 선언은 storepayment (camelCase)를 사용하고 있습니다. 일관성을 위해 통일해야 합니다.

🤖 Prompt for AI Agents
In
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentNotFoundException.java
at line 1, the package declaration uses 'storepayment' in lowercase, which does
not match the directory name 'storePayment' with uppercase 'P'. Update the
package declaration to 'com.nowait.domaincorerdb.storePayment.exception' to
match the folder structure and maintain consistency.

@@ -0,0 +1,10 @@
package com.nowait.domaincorerdb.storepayment.exception;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

패키지 이름 불일치 문제가 있습니다.

파일 경로는 storePayment (PascalCase)를 사용하지만 패키지 선언은 storepayment (camelCase)를 사용하고 있습니다. 일관성을 위해 통일해야 합니다.

🤖 Prompt for AI Agents
In
nowait-domain/domain-core-rdb/src/main/java/com/nowait/domaincorerdb/storePayment/exception/StorePaymentCreationUnauthorizedException.java
at line 1, the package declaration uses 'storepayment' in camelCase, which does
not match the directory name 'storePayment' in PascalCase. Update the package
declaration to 'storePayment' to ensure consistency with the file path and avoid
package naming conflicts.

@Jjiggu Jjiggu merged commit b1c6485 into develop Jul 11, 2025
1 check was pending
@Jjiggu Jjiggu deleted the feature/#104-Payment-Method branch July 23, 2025 09:50
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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant