叫号返回叫号状态

This commit is contained in:
2024-09-24 15:03:05 +08:00
parent 69ec3f381c
commit 1e09c75ea0
2 changed files with 17 additions and 6 deletions

View File

@@ -227,7 +227,9 @@ public class TbCallServiceImpl implements TbCallService {
}
if (callQueue.getSubState().equals(0)) {
throw new BadRequestException("当前用户未订阅微信提醒");
return new HashMap<String, Object>(){{
put("state", "-1");
}};
}
callQueue.setState((byte) 1);
@@ -254,7 +256,9 @@ public class TbCallServiceImpl implements TbCallService {
if (StrUtil.isBlank(callQueue.getOpenId())) {
throw new BadRequestException("此用户未订阅微信小程序消息");
return new HashMap<String, Object>(){{
put("state", "-1");
}};
}
wxMiniUtils.sendCurrentOrNearCallMsg(shopInfo.getShopName(), getStrByState(Integer.valueOf(callQueue.getState())),
@@ -273,7 +277,9 @@ public class TbCallServiceImpl implements TbCallService {
wxMiniUtils.sendCurrentOrNearCallMsg(shopInfo.getShopName(), getStrByState(Integer.valueOf(nearQueue.getState())),
nearQueue.getCallNum(), current.isEmpty() ? "" : current.get(0).getCallNum(), "排号信息", nearQueue.getOpenId(), true);
}
return flag;
return new HashMap<String, Object>(){{
put("state", "1");
}};
}
private String getStrByState(Integer state) {