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 60eb167..f59f9b6 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 @@ -9,6 +9,7 @@ import com.chaozhanggui.system.cashierservice.entity.TbCallTable; import com.chaozhanggui.system.cashierservice.entity.TbShopInfo; import com.chaozhanggui.system.cashierservice.entity.dto.CancelCallQueueDTO; import com.chaozhanggui.system.cashierservice.entity.dto.TakeNumberDTO; +import com.chaozhanggui.system.cashierservice.entity.vo.CallQueueInfoVO; import com.chaozhanggui.system.cashierservice.exception.MsgException; import com.chaozhanggui.system.cashierservice.mapper.TbCallQueueMapper; import com.chaozhanggui.system.cashierservice.redis.RedisCst; @@ -21,6 +22,7 @@ import org.springframework.context.annotation.Primary; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; +import java.util.List; import java.util.concurrent.atomic.AtomicReference; @Service @@ -118,10 +120,7 @@ public class TbCallServiceImpl implements TbCallService { @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(); + List callQueueInfoVOS = callQueueMapper.selectInfoByOpenId(shopId, openId, DateUtil.today()); + return callQueueInfoVOS.isEmpty() ? null : callQueueInfoVOS.get(0); } }