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

OrderDetailSample ; Sample Data 생성 오류 #1

Open
wonkr opened this issue Jan 19, 2021 · 0 comments
Open

OrderDetailSample ; Sample Data 생성 오류 #1

wonkr opened this issue Jan 19, 2021 · 0 comments

Comments

@wonkr
Copy link

wonkr commented Jan 19, 2021

orderdetail table 에서 quantity 와 total_amount 가 입력해야해서 오류가 생겨서,
code상 확인해보니 아이템을 한개씩 구매하는 것 같아서 다음과 같이 임의로 코드를 추가했습니다.

OrderDetail orderDetail = OrderDetail.builder()
.orderGroup(orderGroup)
.item(item)
.quantity(1)
.totalPrice(item.getPrice())

.arrivalDate(type.equals(OrderType.ALL) ? orderGroup.getArrivalDate() : getRandomDate())
.status(type.equals(OrderType.ALL) ? status :orderDetailStatus)
.build();

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

No branches or pull requests

1 participant