Skip to content

Conversation

@asa9874
Copy link
Member

@asa9874 asa9874 commented Oct 27, 2025

🔍 개요

  • 주문 상점 전환 POST API를 추가하다

🚀 주요 변경 내용

  • 주문 상점 전환 POST API 추가
  • 테스트 코드 포함
  • FLYWAY CREATE TABLE 포함
  • 상점관의 관계 ManyToOne으로 생성 (반려후에 다시 신청할수있도록)
    • 이렇게 바꾸니 동시 요청에 대한 방어가 안될거같네요

💬 참고 사항

  • accountNumber 평문 저장? (개인정보?)
  • 상점관의 관계 ManyToOne관련 이슈?
    • 이렇게 바꾸니 동시 요청에 대한 방어가 안될거같네요 .....

✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

* feat: 빈 java 파일들 생성

* feat: ShopToOrderable Post를 스켈레톤코드 작성

* refact: DTO, Model 필드 생성 (임시)

* feat: Controller 수정

* feat: Service, Repository 단

* refact: 컨벤션 수정

* refact: 예외코드 추가 및 수정, 엔드포인트 경로 변경,

* refact: Entity 리펙토링

* refact: 미사용 import 제거

* refact: {shopId} 추가 및 개행 제거
* feat: 검증 추가

* feat: 주문가능상점변환 테스트 추가

* refact: 매개변수 stirng -> ShopToOrderableRequestStatus로 변경

* refact: 예외 명 변경
@asa9874 asa9874 self-assigned this Oct 27, 2025
@asa9874 asa9874 added 기능 새로운 기능을 개발합니다. Team Business 비즈니스 팀에서 작업할 이슈입니다 labels Oct 27, 2025
@asa9874 asa9874 changed the title feat : 주문 상점 전환 POST API를 추가하다 feat: 주문 상점 전환 POST API를 추가하다 Oct 27, 2025
@github-actions
Copy link

github-actions bot commented Oct 27, 2025

Unit Test Results

673 tests   672 ✔️  1m 14s ⏱️
165 suites      1 💤
165 files        0

Results for commit 7755783.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@Soundbar91 Soundbar91 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다.
지금 돌아가는 건 확인하지 못해서, 코드 보고 확인할 수 있는 부분에 대해서만 코멘트 달았습니다.
확인 부탁드립니다 !

accountNumber 평문 저장? (개인정보?)

이게 계좌번호인거죠 ? 정리된 글을 보니까, 암호화해야할 거 같아요.
슬랙에서 한 번 이야기 나눠보면 좋을 거 같아욥

상점관의 관계 ManyToOne관련 이슈

~OneToOne에서 ManyToOne으로 바꾸신 이유가 궁금합니다 👀 ~
-> 아 적혀있었네요..! 동시 요청 관련해서 어노테이션이 있어서, 한 번 적용해보는 것도 좋을 거 같아요.

import in.koreatech.koin.global.auth.Auth;
import jakarta.validation.Valid;

//Todo: ShopToOrderable 이라는 명칭은 임시임 추후 변경
Copy link
Collaborator

Choose a reason for hiding this comment

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

C

ShopToOrderable으로 확정하신건가용
개인적으로는 ownershop 패키지 하위로 들어가도 괜찮을 거 같은데 어떻게 생각하시나요 ??

Copy link
Member Author

Choose a reason for hiding this comment

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

해당 스프린트가 아직 명확하게 요구사항이 정해지지 않아서, 우선 독립적으로 패키지를 만들어 제작을 시작했습니다.
추후 요구사항이 명확해지게 되면, 프로젝트 구조에 맞게 패키지 구조를 조정할려고 하는데 괜찮을까요?

Comment on lines +64 to +66
@Size(max = 10)
@Column(name = "bank", length = 10, nullable = false)
private String bank;
Copy link
Collaborator

Choose a reason for hiding this comment

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

A

bank를 String 말고 enum으로 관리할 수 있을까요 👀
db에서 관리하기 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

해당 부분은 요구사항측에서 은행의 종류같은게 정해지면 enum으로 관리 하는게 좋을거같아요.

db에서 관리는 enum 말고 테이블로 (1, "OO은행") , (2,"AA은행")으로해서 연관으로 관리한다는 의미인가요?

private String accountNumber;

@Enumerated(EnumType.STRING)
@Column(name = "request_status", nullable = false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

A

status으로 표현해도 괜찮을 거 같아요

Copy link
Collaborator

@Soundbar91 Soundbar91 left a comment

Choose a reason for hiding this comment

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

확인해주세욥

Copy link
Collaborator

@Soundbar91 Soundbar91 left a comment

Choose a reason for hiding this comment

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

SwaggerGroupConfig 클래스에서 스웨거 그룹을 설정할 수 있습니다 !
패키지를 새롭게 추가하는 경우 패키지 경로를 넣어주셔야, 스웨거에서 확인이 가능합니당

@Bean
    public GroupedOpenApi businessApi() {
        return createGroupedOpenApi(
            "2. Business API",
            new String[] {
                "in.koreatech.koin.domain.owner",
                "in.koreatech.koin.domain.benefit",
                "in.koreatech.koin.domain.ownershop",
                "in.koreatech.koin.domain.shop",
                "in.koreatech.koin.domain.land",
                "in.koreatech.koin.domain.shoptoOrderable",
            });
    }

@asa9874
Copy link
Member Author

asa9874 commented Oct 28, 2025

@DuplicateGuard 추가로 동시성 방지를 추가했습니다

Swagger 에서의 테스트

1. 자기 상점이 아닌경우

image

2. 자기 상점인 경우

image image

3. PENDING 상태인 요청이 있는경우

image

4. APPROVED 상태인 요청이 있는경우

image

5. REJECTED 상태인 요청이 있는경우 (PENDING , APPROVED 없는경우 )

image image

@asa9874 asa9874 requested a review from Soundbar91 October 28, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team Business 비즈니스 팀에서 작업할 이슈입니다 기능 새로운 기능을 개발합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[비즈니스] 주문 가능 상점 전환(주문 서비스 가입) POST API 추가

3 participants