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));