diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java index a246724..0643281 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/CartService.java @@ -761,7 +761,7 @@ public class CartService { } ShopEatTypeInfoDTO shopEatTypeInfoDTO = shopUtils.checkEatModel(tableId, shopId); Integer currentPlaceNum = getCurrentPlaceNum(tableId, shopId, shopEatTypeInfoDTO); - String tableCartKey = RedisCst.getTableCartKey(shopId, tableId, Integer.valueOf(userId)); + String tableCartKey = RedisCst.getTableCartKey(shopId, shopEatTypeInfoDTO.isOpenDineIn() ? tableId : null, Integer.valueOf(userId)); JSONArray array = JSON.parseArray(redisUtil.getMessage(tableCartKey)); // 查询购物车所有信息 LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper()