Skip to content

Commit

Permalink
fix: 쿠폰 재고 감소 시 누락된 숙소 재고 보상 트랜젝션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chaewon12 committed Feb 1, 2024
1 parent 5dd90be commit e91dc7d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ public void create(Member currentMember, CreateReservationRequest request) {
* 쿠폰 재고 차감
* */
if (coupon != null) {
stockService.decreaseCouponStock(coupon.getId()); //lock
try {
stockService.decreaseCouponStock(coupon.getId()); //lock
} catch (Exception e) {
for (RoomStock roomStock : roomStocks) {
stockService.increaseRoomStock(roomStock.getId()); //lock
}
}
}

/*
Expand Down

0 comments on commit e91dc7d

Please sign in to comment.