-
Notifications
You must be signed in to change notification settings - Fork 1
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
[#41] [FEATURE] 반찬의 이미지 URL을 이미지 엔티티로 분리 #45
Conversation
domain/src/main/java/core/startup/mealtoktok/domain/dishstore/DishService.java
Outdated
Show resolved
Hide resolved
return DishAndImage.of(dish, image); | ||
} | ||
|
||
public List<DishAndImage> searchDishes(TargetDishStore targetDishStore, String keyword) { |
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.
이거도 그렇게 readDishs()도 그렇게 targetDishStore를 파라미터로 받고있는데
저희가 반찬가게별로 반찬을 조회하는게 아니지않나요?
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.
아 그렇네요..!!
domain/src/main/java/core/startup/mealtoktok/domain/dishstore/DishService.java
Outdated
Show resolved
Hide resolved
domain/src/main/java/core/startup/mealtoktok/domain/dishstore/DishImageReader.java
Outdated
Show resolved
Hide resolved
infra/src/main/java/core/startup/mealtoktok/infra/dishstore/repository/CoreDishRepository.java
Show resolved
Hide resolved
domain/src/main/java/core/startup/mealtoktok/domain/dishstore/DishAndImage.java
Show resolved
Hide resolved
domain/src/main/java/core/startup/mealtoktok/domain/dishstore/DishAndImage.java
Show resolved
Hide resolved
domain/src/main/java/core/startup/mealtoktok/domain/dishstore/DishService.java
Outdated
Show resolved
Hide resolved
그리고 제가 좀더 살펴봤는데 isSoldOut 컬럼이 아니라 DishState 라는 Enum 클래스를 만들고 이 클래스로 Dish의 상태를 관리하는게 좋을거같아요! State 관련 도메인 로직은 저의 Order 또는 MealDelivery 한번 참고해주세요 그리고 따로 Dish의 수량(quantiy)를 관리해줘야할거같다는 생각이 들어요 주문 할때마다 quantity가 줄어들고 0이되면 state가 SOLD_OUT으로 바뀌는거죠 주문할떄마다 수량이 줄어드는 로직은 제가 구현할게요 Dish 도메인만 손봐주세요! |
@@ -48,7 +50,7 @@ private void checkMealNameExistsExcludingTarget(Meal meal, String mealName) { | |||
private void checkDishSoldOut(List<Long> dishIds) { |
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.
도시락을 만들때 품절이라고 예외를 내보내면 안될거같아요
이미 만들어높은 도시락중에 품절이 생길수도있고 품절된 상품이있다고 도시락을 만들지 못하는건 안될거같아요
예외는 주문할때 던지면 충분할거같아요!
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.
넵 수정했습니다~~
고생하셧어요~ |
✨ 구현 기능 명세
✅ PR Point