Skip to content

Commit

Permalink
fix: 참여자 이름 변경시 지출 상세 이름 변경 안되는 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Arachneee committed Aug 22, 2024
1 parent 6d0b1ce commit 1c7f25d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private void validateAfterMemberNameNotExist(Event event, String afterName) {
private void updateMemberName(Event event, String beforeName, String afterName) {
memberActionRepository.findAllByAction_EventAndMemberName(event, beforeName)
.forEach(memberAction -> memberAction.updateMemberName(afterName));
billActionDetailRepository.findAllByMemberName(beforeName)
billActionDetailRepository.findAllByBillAction_Action_EventAndMemberName(event, beforeName)
.forEach(billActionDetail -> billActionDetail.updateMemberName(afterName));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import server.haengdong.domain.event.Event;

@Repository
public interface BillActionDetailRepository extends JpaRepository<BillActionDetail, Long> {
Expand All @@ -15,5 +16,5 @@ public interface BillActionDetailRepository extends JpaRepository<BillActionDeta
""")
List<BillActionDetail> findAllByBillAction(BillAction billAction);

List<BillActionDetail> findAllByMemberName(String memberName);
List<BillActionDetail> findAllByBillAction_Action_EventAndMemberName(Event event, String memberName);
}

0 comments on commit 1c7f25d

Please sign in to comment.