From 9ed26c0fc4fb8a8ae92af3491961c77be62b07f1 Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Thu, 10 Oct 2024 10:32:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/service/PayService.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java index ab726b1..b6d64dd 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java @@ -297,7 +297,7 @@ public class PayService { // 修改台桌状态 TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper().eq(TbShopTable::getQrcode, orderInfo.getTableId())); - if (shopTable.getAutoClear() == 1) { + if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) { mpShopTableMapper.update(null, new LambdaUpdateWrapper() .eq(TbShopTable::getQrcode, orderInfo.getTableId()) .set(TbShopTable::getStatus, TableStateEnum.IDLE.getState())); @@ -323,7 +323,7 @@ public class PayService { // 修改台桌状态 TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper().eq(TbShopTable::getQrcode, orderInfo.getTableId())); - if (shopTable.getAutoClear() == 1) { + if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) { mpShopTableMapper.update(null, new LambdaUpdateWrapper() .eq(TbShopTable::getQrcode, orderInfo.getTableId()) .set(TbShopTable::getStatus, TableStateEnum.IDLE.getState())); @@ -388,7 +388,7 @@ public class PayService { producer.printMechine(orderId); // 修改台桌状态 TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper().eq(TbShopTable::getQrcode, orderInfo.getTableId())); - if (shopTable.getAutoClear() == 1) { + if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) { mpShopTableMapper.update(null, new LambdaUpdateWrapper() .eq(TbShopTable::getQrcode, orderInfo.getTableId()) .set(TbShopTable::getStatus, TableStateEnum.IDLE.getState())); @@ -410,7 +410,7 @@ public class PayService { tbOrderPaymentMapper.updateByPrimaryKeySelective(payment); // 修改台桌状态 TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper().eq(TbShopTable::getQrcode, orderInfo.getTableId())); - if (shopTable.getAutoClear() == 1) { + if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) { mpShopTableMapper.update(null, new LambdaUpdateWrapper() .eq(TbShopTable::getQrcode, orderInfo.getTableId()) .set(TbShopTable::getStatus, TableStateEnum.IDLE.getState())); @@ -900,7 +900,7 @@ public class PayService { producer.sendStockSaleMsg(mqData); // 修改台桌状态 TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper().eq(TbShopTable::getQrcode, orderInfo.getTableId())); - if (shopTable.getAutoClear() == 1) { + if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) { mpShopTableMapper.update(null, new LambdaUpdateWrapper() .eq(TbShopTable::getQrcode, orderInfo.getTableId()) .set(TbShopTable::getStatus, TableStateEnum.IDLE.getState())); @@ -997,7 +997,7 @@ public class PayService { // 修改台桌状态 TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper().eq(TbShopTable::getQrcode, orderInfo.getTableId())); - if (shopTable.getAutoClear() == 1) { + if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) { mpShopTableMapper.update(null, new LambdaUpdateWrapper() .eq(TbShopTable::getQrcode, orderInfo.getTableId()) .set(TbShopTable::getStatus, TableStateEnum.IDLE.getState())); @@ -1091,7 +1091,7 @@ public class PayService { // 修改台桌状态 TbShopTable shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper().eq(TbShopTable::getQrcode, orderInfo.getTableId())); - if (shopTable.getAutoClear() == 1) { + if (shopTable.getAutoClear() != null && shopTable.getAutoClear() == 1) { mpShopTableMapper.update(null, new LambdaUpdateWrapper() .eq(TbShopTable::getQrcode, orderInfo.getTableId()) .set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));