排队取号修改

This commit is contained in:
2024-10-18 13:46:30 +08:00
parent eccfba8a0e
commit 0fb95098e3

View File

@@ -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);