From 18a2157788aa2f24ceb5941267e9550081555d7b Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Wed, 9 Oct 2024 15:13:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E4=B8=8D?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E9=A4=90=E4=BD=8D=E8=B4=B9=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/service/OrderService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java index c74e180..ecb864c 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.chaozhanggui.system.cashierservice.constant.TableConstant; import com.chaozhanggui.system.cashierservice.dao.*; import com.chaozhanggui.system.cashierservice.entity.*; import com.chaozhanggui.system.cashierservice.entity.dto.ShopEatTypeInfoDTO; @@ -465,6 +466,7 @@ public class OrderService { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() .eq(TbOrderDetail::getShopId, orderInfo.getShopId()) + .ne(TbOrderDetail::getProductId, TableConstant.CART_SEAT_ID) .eq(TbOrderDetail::getOrderId, orderId); List list = mpOrderDetailMapper.selectList(queryWrapper); @@ -485,11 +487,11 @@ public class OrderService { HashMap item = new HashMap<>(); item.put("placeNum", k); item.put("placeTime", v.isEmpty() ? null : DateUtil.format(v.get(0).getCreateTime(), "HH:mm:ss")); - item.put("info", v); BigDecimal totalPrice = BigDecimal.ZERO; for (TbOrderDetail d : v) { totalPrice = totalPrice.add(d.getPriceAmount()); } + item.put("info", v); item.put("totalAmount", totalPrice); dataList.add(item); });