Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

주문하기 API 구현 #26

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

주문하기 API 구현 #26

wants to merge 20 commits into from

Conversation

olivejua
Copy link
Contributor

@olivejua olivejua commented Oct 29, 2022

내용

  • Querydsl 의존성 추가
  • 주문하기 API 구현 (/api/orders)
  • Order, Store, Menu 등 DB 데이터 조회용 CommonService 생성
  • Menu : MenuOption (1:N 관계) / MenuOption : MenuSelection (1:N관계) 에 대한 조회용 MenuQueryRepository 생성 (Querydsl 사용)
  • 테스트 환경 - Menu, MenuOption, MenuSelection 엔티티에 대한 Mock 객체 및 테스트 객체 생성 클래스 생성
  • 테스트 환경 - 주문하기 API 성공 테스트케이스 추가

View Request(OrderDoViewRequest.java) 객체와 비즈니스 모델(OrderMenu.java)을 나누었지만 OrderService 내에서 이를 매핑하는 과정이 조금 복잡하게 만든 것 같아 추가 리팩토링이 필요할 것 같습니다! 변경파일 양이 많아 먼저 PR 올립니다~!

@olivejua olivejua self-assigned this Oct 29, 2022

Long savedOrderId = orderCommonService.save(order.toOrderDto());
orderMenuCommonService.saveAll(savedOrderId, order.toOrderMenuDtos());
return null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

반환값이 없네요~ order 를 넘겨줘야 할 듯


orderService.order(request, requestUser);

return ResponseEntity.ok(SuccessResult.createResult());
Copy link
Collaborator

Choose a reason for hiding this comment

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

주문과 결제를 분리하려면 주문번호를 응답을 주어야, 결제를 진행 가능하겠죠?

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