-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat] 요청 수정 API 생성 #71
Conversation
@@ -39,4 +40,11 @@ data class Order( | |||
@NotNull | |||
var isReviewed: Boolean = false | |||
|
|||
) : BaseEntity() | |||
) : BaseEntity() { | |||
fun editOrder(orderReq: OrderReq) { |
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.
전 좋은 것 같아유 -!!
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.
저두 조하용
@@ -21,7 +21,7 @@ class OrderService( | |||
) { | |||
// 요청하기 | |||
fun makeOrder(user: User, orderReq: OrderReq) { | |||
val product: Product = productRepository.findByIdAndStatus(orderReq.productId, ACTIVE_STATUS) | |||
val product: Product = orderReq.productId?.let { productRepository.findByIdAndStatus(it, ACTIVE_STATUS) } |
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.
또 하나 알아가는 코드 ㅋㅑ
fun editOrder( | ||
@AuthenticationPrincipal userAccount: UserAccount, | ||
@PathVariable orderId: Long, | ||
@RequestBody(required = false) @Valid orderReq: OrderReq?, |
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.
와 미춋다 대박
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.
최굡!!
fun editOrder( | ||
@AuthenticationPrincipal userAccount: UserAccount, | ||
@PathVariable orderId: Long, | ||
@RequestBody(required = false) @Valid orderReq: OrderReq?, |
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.
와 미춋다 대박
🌱 이슈 번호
close #69
💬 기타 사항