快餐模式修改

This commit is contained in:
2024-09-28 15:10:33 +08:00
parent 6ba38ae9d7
commit 3e45f13747

View File

@@ -754,6 +754,9 @@ public class CartService {
}
// 获取当前下单次数和用餐类型
if ("takeself".equals(sendType)) {
tableId = null;
}
ShopEatTypeInfoDTO shopEatTypeInfoDTO = shopUtils.checkEatModel(tableId, shopId);
Integer currentPlaceNum = getCurrentPlaceNum(tableId, shopId, shopEatTypeInfoDTO);
@@ -770,8 +773,9 @@ public class CartService {
queryWrapper.eq(TbCashierCart::getUserId, userId);
// 台桌点单
} else {
String finalTableId = tableId;
queryWrapper.and(q -> {
q.eq(TbCashierCart::getTableId, tableId).or().eq(TbCashierCart::getUserId, userId);
q.eq(TbCashierCart::getTableId, finalTableId).or().eq(TbCashierCart::getUserId, userId);
});
shopTable = mpShopTableMapper.selectOne(new LambdaQueryWrapper<TbShopTable>()