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

Feature/219 양도 취소시 상태값 변경 #220

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import site.goldenticket.common.constants.OrderStatus;
import site.goldenticket.common.exception.CustomException;
import site.goldenticket.common.response.ErrorCode;
Expand Down Expand Up @@ -271,6 +272,7 @@ public HandoverResponse handOverProduct(Long productId, PrincipalDetails princip
}

@Override
@Transactional
public NegoResponse denyHandoverProduct(Long productId, PrincipalDetails principalDetails) {
Long userId = principalDetails.getUserId();

Expand All @@ -282,7 +284,7 @@ public NegoResponse denyHandoverProduct(Long productId, PrincipalDetails princip
() -> new CustomException(ErrorCode.ORDER_NOT_FOUND)
);
paymentService.cancelPayment(paymentService.findByOrderId(order.getId()).getImpUid());

order.orderCancel();

// Product에 대한 모든 네고 가져오기
List<Nego> allNegosForProduct = negoRepository.findAllByProduct(product);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public void paymentFailed() {
status = OrderStatus.PAYMENT_FAILED;
}

public void orderCancel() {
status = OrderStatus.CANCEL;
}

public void changeViewCheck() {
customerViewCheck = true;
}
Expand Down
Loading