1.排队取号 增加叫号状态接口
This commit is contained in:
@@ -11,4 +11,6 @@ public interface TbCallService {
|
||||
Object getAllInfo(Integer shopId);
|
||||
|
||||
Object cancel(CancelCallQueueDTO cancelCallQueueDTO);
|
||||
|
||||
Object getState(String openId, Integer shopId);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user