fix: 只选择餐位费不允许创建订单

This commit is contained in:
张松
2024-11-07 11:02:35 +08:00
parent 7b333543a7
commit 6fd8a4f7d0

View File

@@ -834,12 +834,14 @@ public class OrderService {
}
}
if (shopInfo.getIsTableFee() != null && shopInfo.getIsTableFee() == 0
&& !eatTypeInfoDTO.isTakeout() && mealNum == null
) {
if (eatTypeInfoDTO.isNeedSeatFee() && mealNum == null) {
return Result.fail("请选择用餐人数");
}
if (eatTypeInfoDTO.isNeedSeatFee() && list.size() < 2) {
return Result.fail("购物车为空");
}
// 查询历史orderDetail
Integer finalOrderId = orderId;
List<TbOrderDetail> oldOrderDetailList = mPOrderDetailMapper.selectList(new LambdaQueryWrapper<TbOrderDetail>()