Skip to content

Commit

Permalink
Merge pull request #151 from Hanaro-trip-together-bank/feature/trip
Browse files Browse the repository at this point in the history
fix: 일정 하나인 경우, 삭제 불가 이슈 해결
  • Loading branch information
lcw729 authored Jun 7, 2024
2 parents 3da549f + 93fdfa3 commit d6fbcd4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,11 @@ public void updateTripPlace(Long tripIdx, TripPlaceUpdateReqDto reqDto) {
tripPlace.updateOrder(dto.getPlaceOrder(), dto.getTripDate(), member);
}

BigDecimal expectedAmount = tripPlaceRepository.getSumPlaceAmountByTripIdx(tripIdx);
if (reqDto.getNewPlaces().isEmpty()) expectedAmount = BigDecimal.ZERO;

//goalAmount 계산 및 설정
tripService.setExpectedAmount(tripIdx, tripPlaceRepository.getSumPlaceAmountByTripIdx(tripIdx));
tripService.setExpectedAmount(tripIdx, expectedAmount);

}

Expand Down

0 comments on commit d6fbcd4

Please sign in to comment.