diff --git a/src/main/java/com/hanaro/triptogether/tripPlace/service/TripPlaceService.java b/src/main/java/com/hanaro/triptogether/tripPlace/service/TripPlaceService.java index 820472c..5b97dd2 100644 --- a/src/main/java/com/hanaro/triptogether/tripPlace/service/TripPlaceService.java +++ b/src/main/java/com/hanaro/triptogether/tripPlace/service/TripPlaceService.java @@ -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); }