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 735aa31..8a9c422 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 @@ -164,7 +164,7 @@ public class TbCallServiceImpl implements TbCallService { throw new MsgException("您未排号请先排号"); } - if (queue.getOpenId().equals(subMsgDTO.getOpenId()) && queue.getSubState() == 1) { + if (queue.getOpenId() != null && queue.getOpenId().equals(subMsgDTO.getOpenId()) && queue.getSubState() == 1) { return true; } diff --git a/src/main/resources/mapper/TbCallQueueMapper.xml b/src/main/resources/mapper/TbCallQueueMapper.xml index b502da6..12c6a3c 100644 --- a/src/main/resources/mapper/TbCallQueueMapper.xml +++ b/src/main/resources/mapper/TbCallQueueMapper.xml @@ -72,7 +72,7 @@ a.shop_id = #{shopId} AND a.create_day = #{today} -- 替换为目标日期 - and a.open_id = #{openId} or a.open_id is null -- 替换为目标用户的 open_id + and (a.open_id = #{openId} or a.open_id is null) -- 替换为目标用户的 open_id and a.id = #{queueId} -- 替换为目标用户的 open_id