parent
ff27101e13
commit
b1e5ae969b
|
|
@ -36,4 +36,7 @@ public class TbShopTableQueryCriteria{
|
|||
|
||||
@Query
|
||||
private Integer areaId;
|
||||
}
|
||||
|
||||
@Query
|
||||
private Long qrcode;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1594,6 +1594,15 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
|
||||
@Override
|
||||
public Object choseCount(ChoseCountDTO choseCountDTO) {
|
||||
TbShopTable shopTable = mpShopTableService.lambdaQuery().eq(TbShopTable::getQrcode, choseCountDTO.getTableId()).one();
|
||||
if (shopTable == null) {
|
||||
throw new BadRequestException("台桌不存在");
|
||||
}
|
||||
|
||||
if (shopTable.getMaxCapacity() < choseCountDTO.getNum()) {
|
||||
throw new BadRequestException("当前台桌最大人数为: " + shopTable.getMaxCapacity());
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<TbCashierCart> query = new LambdaQueryWrapper<TbCashierCart>()
|
||||
.eq(TbCashierCart::getShopId, choseCountDTO.getShopId())
|
||||
.eq(TbCashierCart::getMasterId, choseCountDTO.getMasterId())
|
||||
|
|
|
|||
Loading…
Reference in New Issue