diff --git a/src/main/java/com/moabam/api/application/bug/BugService.java b/src/main/java/com/moabam/api/application/bug/BugService.java index f06401e8..f1246d45 100644 --- a/src/main/java/com/moabam/api/application/bug/BugService.java +++ b/src/main/java/com/moabam/api/application/bug/BugService.java @@ -80,6 +80,10 @@ public PurchaseProductResponse purchaseBugProduct(Long memberId, Long productId, @Transactional public void use(Member member, BugType bugType, int count) { + if (count == 0) { + return; + } + Bug bug = member.getBug(); bug.use(bugType, count); @@ -88,6 +92,10 @@ public void use(Member member, BugType bugType, int count) { @Transactional public void reward(Member member, BugType bugType, int count) { + if (count == 0) { + return; + } + Bug bug = member.getBug(); bug.increase(bugType, count); @@ -104,6 +112,10 @@ public void charge(Long memberId, Product bugProduct) { @Transactional public void applyCoupon(Long memberId, BugType bugType, int count) { + if (count == 0) { + return; + } + Bug bug = getByMemberId(memberId); bug.increase(bugType, count);