过号发送过号模板消息
This commit is contained in:
@@ -252,9 +252,6 @@ public class TbCallServiceImpl implements TbCallService {
|
||||
.orderByAsc(TbCallQueue::getCreateTime)
|
||||
.page(new Page<>(1, 1)).getRecords();
|
||||
|
||||
if (current.isEmpty()) {
|
||||
throw new BadRequestException("当前用户未排号");
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(callQueue.getOpenId())) {
|
||||
throw new BadRequestException("此用户未订阅微信小程序消息");
|
||||
@@ -328,6 +325,23 @@ public class TbCallServiceImpl implements TbCallService {
|
||||
break;
|
||||
case 3:
|
||||
callQueue.setPassTime(DateUtil.date());
|
||||
TbShopInfo shopInfo = shopInfoRepository.findById(callQueue.getShopId()).orElse(null);
|
||||
if(StrUtil.isBlank(callQueue.getOpenId()) && callQueue.getSubState() != 1) {
|
||||
break;
|
||||
}
|
||||
|
||||
List<TbCallQueue> current = callQueueService.lambdaQuery()
|
||||
.eq(TbCallQueue::getCallTableId, callQueue.getCallTableId())
|
||||
.eq(TbCallQueue::getCreateDay, DateUtil.today())
|
||||
.and(r -> {
|
||||
r.eq(TbCallQueue::getState, 1)
|
||||
.or()
|
||||
.eq(TbCallQueue::getState, 0);
|
||||
})
|
||||
.orderByAsc(TbCallQueue::getCreateTime)
|
||||
.page(new Page<>(1, 1)).getRecords();
|
||||
wxMiniUtils.sendPassCallMsg(shopInfo.getShopName(), getStrByState(Integer.valueOf(updateCallQueueDTO.getState())),
|
||||
callQueue.getCallNum(), current.isEmpty() ? "" : current.get(0).getCallNum(), "即将过号", callQueue.getOpenId());
|
||||
break;
|
||||
default:
|
||||
throw new BadRequestException("错误类型");
|
||||
|
||||
Reference in New Issue
Block a user