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 9f79a57..913b2ad 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 order_id=#{orderId} and order_id is not null") + @Select("select count(*) from tb_order_detail where shop_id=#{shopId} and `status`='unpaid' 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/OrderService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java index af3fcf1..08dd88d 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/OrderService.java @@ -363,6 +363,7 @@ public class OrderService { String day = DateUtils.getDay(); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() + .notIn(TbCashierCart::getStatus, "final", "refund", "closed", "pending") .eq(TbCashierCart::getShopId, shopId); // 普通点单