-
Notifications
You must be signed in to change notification settings - Fork 2
✨ feat : 메뉴 상세 조회 API 구현 #17
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
Conversation
# Conflicts: # build.gradle
✨ feat : 맞춤 추천용 메뉴 목록 조회 API
👷 CI : CI/CD 파이프라인 구축
💚 CI: CI/CD 파이프라인 설정 수정
💚 CI. cd 실행 시, 환경변수가 적용되지 않는 문제 해결
✨ feat : 특정 메뉴를 파는 가게 조회 API 구현
| @Min(value=1, message="quantity는 1 이상이어야 합니다.") | ||
| private int quantity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수량은 필요없을 것 같은딩!
| menu.getCostPrice(), | ||
| menu.getSalePrice(), | ||
| store.getName(), | ||
| quantity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수량도 받지 말고 menu에서 받아오면 좋을 것 같구, 할인율도 계산해서 반환하면 좋을 것 같아요!
store는 위에서 Store store = menu.getStore(); 이렇게 할 필요 없이 menu.getStore().getName() 이렇게 받읍시다!
| public List<MenuDetailsRes> details(MenuDetailsListReq menus) { | ||
| Map<Long, Integer> menuMap = menus.getMenus().stream() | ||
| .collect(Collectors.toMap(MenuDetailsReq::getMenuId, MenuDetailsReq::getQuantity)); | ||
|
|
||
| List<Menu> menuList = menuRepository.findAllById(menuMap.keySet()); | ||
|
|
||
| if (menuList.isEmpty()) {throw new MenuNotFoundException();} | ||
|
|
||
| return menuList.stream() | ||
| .map(menu -> MenuDetailsRes.from(menu, menuMap.get(menu.getId()))) | ||
| .toList(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frombunny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굿굿 ㅎㅎㅎㅎㅎ 병합합시다!
🔍 관련 이슈
✅ 작업 분류
✨ 작업 내용
👥 전달사항
✅ 체크리스트
📸 스크린샷