From c1df28b92960777258cf63e7e9634762e9ad1210 Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Thu, 29 Aug 2024 14:29:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95=20?= =?UTF-8?q?=E5=8F=B0=E6=A1=8C=E7=8A=B6=E6=80=81=E5=90=8C=E6=97=B6=E6=A0=A1?= =?UTF-8?q?=E9=AA=8Cdetail=E5=92=8C=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/dao/TbCashierCartMapper.java | 4 ++-- .../system/cashierservice/service/ShopInfoService.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java index bf2fb70..9f79a57 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/TbCashierCartMapper.java @@ -76,6 +76,6 @@ public interface TbCashierCartMapper { @Select("select count(*) from tb_cashier_cart where shop_id=#{shopId} and `status`='create' and table_id=#{qrcode} and order_id is not null") int countTable(@Param("qrcode") String qrcode, @Param("shopId") Integer shopId); - @Select("select count(*) from tb_order_detail where shop_id=#{shopId} and `status`='create' and table_id=#{qrcode} and order_id is not null") - int countTableByDetail(@Param("qrcode") String qrcode, @Param("shopId") Integer shopId); + @Select("select count(*) from tb_order_detail where shop_id=#{shopId} and `status`='create' and order_id=#{orderId} and order_id is not null") + int countTableByDetail(@Param("orderId") Integer orderId, @Param("shopId") Integer shopId); } diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/ShopInfoService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/ShopInfoService.java index e0edb0e..37d3619 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/ShopInfoService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/ShopInfoService.java @@ -71,7 +71,7 @@ public class ShopInfoService { tbShopTableVO.setStatus("closed"); }else if (tbCashierCartMapper.countTable(tbShopTableVO.getQrcode(), tbShopTableVO.getShopId()) < 1 || - tbCashierCartMapper.countTableByDetail(tbShopTableVO.getQrcode(), tbShopTableVO.getShopId()) < 1 + tbCashierCartMapper.countTableByDetail(tbShopTableVO.getOrderId(), tbShopTableVO.getShopId()) < 1 ) { tbShopTableVO.setStatus("idle"); mpShopTableMapper.update(null, new LambdaUpdateWrapper()