From a6b3acc0af16da41ae8ca697c3c5f54852dcf701 Mon Sep 17 00:00:00 2001 From: Apirom Na Nakorn Date: Sun, 31 Mar 2024 11:52:55 +0700 Subject: [PATCH] Format code --- .../java/com/kampus/kbazaar/cartitem/CartItemService.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kbazaar/src/main/java/com/kampus/kbazaar/cartitem/CartItemService.java b/kbazaar/src/main/java/com/kampus/kbazaar/cartitem/CartItemService.java index 31bcc65..ae1518b 100644 --- a/kbazaar/src/main/java/com/kampus/kbazaar/cartitem/CartItemService.java +++ b/kbazaar/src/main/java/com/kampus/kbazaar/cartitem/CartItemService.java @@ -6,7 +6,6 @@ import java.math.BigDecimal; import java.util.List; import java.util.Optional; - import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -59,10 +58,10 @@ public CartResponse getCartByUsername(String username) { } cartResponse.setGrandTotal( - cartResponse.getSubtotal() + cartResponse + .getSubtotal() .subtract(cartResponse.getTotalDiscount()) - .add(cartResponse.getShippingFee()) - ); + .add(cartResponse.getShippingFee())); } else { Cart cart = new Cart();