From 25a67350260d1c1666609d5325d37ac64e27c4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E5=87=AF=E5=87=AF?= Date: Wed, 4 Dec 2024 17:07:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E5=AE=A2=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E5=A4=9A=E4=B8=AA=E5=95=86=E5=93=81=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=80=BB=E9=87=91=E9=A2=9D=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/shopimpl/TbShopTableServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java index 442c8cea..81a7f4f3 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java @@ -6,6 +6,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.convert.Convert; import cn.hutool.core.date.DateUtil; import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.ysk.cashier.config.security.security.TokenProvider; @@ -544,7 +545,7 @@ public class TbShopTableServiceImpl implements TbShopTableService { cashierCart.setProGroupInfo(JSONObject.toJSONString(foods)); } - }else if (isFixGroup) { + } else if (isFixGroup) { String groupSnap = product.getGroupSnap(); if (StrUtil.isNotBlank(groupSnap)) { ArrayList foods = new ArrayList<>(); @@ -2278,7 +2279,7 @@ public class TbShopTableServiceImpl implements TbShopTableService { for (TbCashierCart cashierCart : cashierCarts) { if (cashierCart.getUserCouponId() == null) { cashierCart.setTotalAmount(cashierCart.getTotalAmount().multiply(discount).setScale(2, RoundingMode.HALF_UP)); - totalAmount = cashierCart.getTotalAmount(); + totalAmount = NumberUtil.add(totalAmount, cashierCart.getTotalAmount()); } // item.setSalePrice(item.getSalePrice().multiply(discount).setScale(2, RoundingMode.HALF_UP)); // item.setMemberPrice(item.getMemberPrice().multiply(discount).setScale(2, RoundingMode.HALF_UP));