1.排队取号 增加叫号状态接口

This commit is contained in:
2024-09-14 17:01:05 +08:00
parent 21d35b3f22
commit 75a07add94
4 changed files with 32 additions and 1 deletions

View File

@@ -11,4 +11,6 @@ public interface TbCallService {
Object getAllInfo(Integer shopId);
Object cancel(CancelCallQueueDTO cancelCallQueueDTO);
Object getState(String openId, Integer shopId);
}

View File

@@ -77,7 +77,9 @@ public class TbCallServiceImpl implements TbCallService {
TbCallQueue callQueue = callQueueService.lambdaQuery()
.eq(TbCallQueue::getPhone, takeNumberDTO.getPhone())
.eq(TbCallQueue::getOpenId, takeNumberDTO.getOpenId())
.eq(TbCallQueue::getShopId, takeNumberDTO.getShopId())
.eq(TbCallQueue::getCreateDay, DateUtil.today())
.in(TbCallQueue::getState, 0, 1)
.eq(TbCallQueue::getCallTableId, takeNumberDTO.getCallTableId()).one();
if (callQueue != null) {
@@ -90,6 +92,7 @@ public class TbCallServiceImpl implements TbCallService {
callQueue.setShopId(shopInfo.getId());
callQueue.setShopName(shopInfo.getShopName());
callQueue.setCallNum(getCallNumber(takeNumberDTO.getShopId(), callTable));
callQueue.setCreateDay(DateUtil.today());
return callQueueService.save(callQueue);
}
@@ -111,4 +114,14 @@ public class TbCallServiceImpl implements TbCallService {
.set(TbCallQueue::getCallTime, DateUtil.date())
.set(TbCallQueue::getState, -1).update();
}
@Override
public Object getState(String openId, Integer shopId) {
return callQueueService.lambdaQuery()
.eq(TbCallQueue::getOpenId, openId)
.eq(TbCallQueue::getCreateDay, DateUtil.today())
.eq(TbCallQueue::getShopId, shopId)
.one();
}
}