From 099f5f58a511c92b3eee8d6c48c3fa145fd598f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Tue, 17 Dec 2024 09:18:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BD=AC=E6=A1=8C=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?=E6=9C=AA=E4=B8=8B=E5=8D=95=E4=B8=8D=E5=85=81=E8=AE=B8=E8=BD=AC?= =?UTF-8?q?=E6=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/shopimpl/TbShopTableServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 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 a6682883..4157c66e 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 @@ -3429,6 +3429,9 @@ public class TbShopTableServiceImpl implements TbShopTableService { TbCashierCart currentSeatFee = null; ArrayList updateCartInfos = new ArrayList<>(); for (TbCashierCart item : cashierCarts) { + if (item.getOrderId() == null) { + throw new BadRequestException("商品未下单无法转台并台"); + } if (targetSeatFee == null || !TableConstant.CART_SEAT_ID.equals(item.getProductId())) { item.setTableId(switchTableDTO.getTargetTableId()); item.setMasterId(masterId); @@ -3436,9 +3439,7 @@ public class TbShopTableServiceImpl implements TbShopTableService { } cartIds.add(item.getId()); - if (item.getOrderId() != null) { - orderId = item.getOrderId(); - } + orderId = item.getOrderId(); if (TableConstant.CART_SEAT_ID.equals(item.getProductId())) { currentSeatFee = item;