From 9b5733b47b03c0f6ae9e4b28e427df64b91f55db Mon Sep 17 00:00:00 2001 From: HyunA Date: Mon, 29 Jan 2024 14:52:06 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=BF=A0=ED=8F=B0=20=EB=A7=8C=EB=93=A4?= =?UTF-8?q?=EA=B8=B0=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EA=B2=B0=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../upjuyanolja/domain/point/service/PointService.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/java/com/backoffice/upjuyanolja/domain/point/service/PointService.java b/src/main/java/com/backoffice/upjuyanolja/domain/point/service/PointService.java index 98426166..54d95306 100644 --- a/src/main/java/com/backoffice/upjuyanolja/domain/point/service/PointService.java +++ b/src/main/java/com/backoffice/upjuyanolja/domain/point/service/PointService.java @@ -395,7 +395,6 @@ private void useChargePointForCoupon(long totalPrice, Long pointChargeId, Point } long totalBalance = memberPoint.getTotalPointBalance() - totalPrice; - validatePointChargeStatus(memberPoint, totalBalance); updateTotalPointBalance(memberPoint, totalBalance); } @@ -638,13 +637,4 @@ private void validatePointRefund(PointCharges pointCharges) { } } - private void validatePointChargeStatus(Point point, long totalBalance) { - long correctBalance = - Optional.ofNullable(pointChargesRepository.sumTotalPaidPoint(point)).orElse(0L) + - Optional.ofNullable(pointChargesRepository.sumTotalRemainedPoint(point)).orElse(0L); - if (totalBalance != correctBalance) { - throw new PointTradeFailedException(); - } - } - }