Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/query-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matrixpower1004 authored Jan 29, 2024
2 parents 941883b + d61e3fc commit 8346f82
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ private void useChargePointForCoupon(long totalPrice, Long pointChargeId, Point
}

long totalBalance = memberPoint.getTotalPointBalance() - totalPrice;
validatePointChargeStatus(memberPoint, totalBalance);
updateTotalPointBalance(memberPoint, totalBalance);
}

Expand Down Expand Up @@ -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();
}
}

}

0 comments on commit 8346f82

Please sign in to comment.