限制台桌选择人数

This commit is contained in:
2024-09-27 17:47:32 +08:00
parent e8f0b22268
commit 6d66bd558b

View File

@@ -314,6 +314,13 @@ public class CartService {
continue;
}
if (isSeatCart) {
TbShopTable shopTable = shopTableMapper.selectQRcode(tableId);
if (cashierCart.getTotalNumber() > shopTable.getMaxCapacity()) {
return Result.fail("当前台桌最大人数未: " + shopTable.getMaxCapacity());
}
}
if (cashierCart.getNumber() > 0) {
// 设置备注
cashierCart.setNote(note);