叫号最先保存叫号信息

This commit is contained in:
SongZhang 2024-09-26 09:45:25 +08:00
parent 224cc4999c
commit dde33361eb
1 changed files with 5 additions and 5 deletions

View File

@ -226,16 +226,17 @@ public class TbCallServiceImpl implements TbCallService {
throw new BadRequestException("叫号用户不存在");
}
callQueue.setState((byte) 1);
callQueue.setCallCount(callQueue.getCallCount() + 1);
callQueue.setCallTime(DateUtil.date());
callQueueService.updateById(callQueue);
if (callQueue.getSubState().equals(0)) {
return new HashMap<String, Object>(){{
put("state", "-1");
}};
}
callQueue.setState((byte) 1);
callQueue.setCallCount(callQueue.getCallCount() + 1);
callQueue.setCallTime(DateUtil.date());
// 发送模板消息通知用户
TbShopInfo shopInfo = shopInfoRepository.findById(callQueue.getShopId()).orElse(null);
@ -263,7 +264,6 @@ public class TbCallServiceImpl implements TbCallService {
wxMiniUtils.sendCurrentOrNearCallMsg(shopInfo.getShopName(), getStrByState(Integer.valueOf(callQueue.getState())),
callQueue.getCallNum(), current.isEmpty() ? "" : current.get(0).getCallNum(), "排号信息", callQueue.getOpenId(), false);
callQueueService.updateById(callQueue);
TbCallConfig config = getConfig(callQueueDTO.getShopId());
// 临近用户提醒