From 93fdfa381c6e4f2c2b7bb8b677df282fa37ec216 Mon Sep 17 00:00:00 2001 From: lcw729 Date: Fri, 7 Jun 2024 16:29:32 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9D=BC=EC=A0=95=20=ED=95=98=EB=82=98?= =?UTF-8?q?=EC=9D=B8=20=EA=B2=BD=EC=9A=B0,=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EB=B6=88=EA=B0=80=20=EC=9D=B4=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../triptogether/tripPlace/service/TripPlaceService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); }