diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/impl/TbCallServiceImpl.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/impl/TbCallServiceImpl.java index 1118233..dc0f85c 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/impl/TbCallServiceImpl.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/impl/TbCallServiceImpl.java @@ -91,11 +91,20 @@ public class TbCallServiceImpl implements TbCallService { .eq(TbCallQueue::getShopId, takeNumberDTO.getShopId()) .eq(TbCallQueue::getCreateDay, DateUtil.date().toString("yyyy-MM-dd")) .in(TbCallQueue::getState, 0, 1) - .ne(TbCallQueue::getIsPostpone, 2) +// .ne(TbCallQueue::getIsPostpone, 2) .eq(TbCallQueue::getCallTableId, takeNumberDTO.getCallTableId()).one(); if (callQueue != null) { throw new MsgException("您已取号,请勿重复取号"); } + Integer count = callQueueService.lambdaQuery() + .eq(TbCallQueue::getPhone, takeNumberDTO.getPhone()) + .eq(TbCallQueue::getShopId, takeNumberDTO.getShopId()) + .eq(TbCallQueue::getCreateDay, DateUtil.date().toString("yyyy-MM-dd")) + .in(TbCallQueue::getState, 0, 1) + .eq(TbCallQueue::getCallTableId, takeNumberDTO.getCallTableId()).count(); + if (count > 0) { + throw new MsgException("此号码已取号,请更换号码"); + } callQueue = BeanUtil.copyProperties(takeNumberDTO, TbCallQueue.class); callQueue.setSubState(0);