diff --git a/server/src/main/java/server/haengdong/application/MemberActionService.java b/server/src/main/java/server/haengdong/application/MemberActionService.java index 6239dbfd9..67b358e3f 100644 --- a/server/src/main/java/server/haengdong/application/MemberActionService.java +++ b/server/src/main/java/server/haengdong/application/MemberActionService.java @@ -88,7 +88,7 @@ public void deleteMemberAction(String token, Long actionId) { memberActionRepository.deleteAllByMemberNameAndMinSequence(memberAction.getMemberName(), memberAction.getSequence()); - List billActions = billActionRepository.findByGreaterThanSequence(action.getSequence()); + List billActions = billActionRepository.findByEventAndGreaterThanSequence(event, action.getSequence()); billActions.forEach(billAction -> resetBillAction(event, billAction)); } diff --git a/server/src/main/java/server/haengdong/domain/action/BillActionRepository.java b/server/src/main/java/server/haengdong/domain/action/BillActionRepository.java index 33b76a0c6..817a63bf8 100644 --- a/server/src/main/java/server/haengdong/domain/action/BillActionRepository.java +++ b/server/src/main/java/server/haengdong/domain/action/BillActionRepository.java @@ -21,7 +21,7 @@ public interface BillActionRepository extends JpaRepository { @Query(""" select ba from BillAction ba - where ba.action.sequence > :sequence + where ba.action.event = :event and ba.action.sequence > :sequence """) - List findByGreaterThanSequence(Long sequence); + List findByEventAndGreaterThanSequence(Event event, Long sequence); }