订阅修改

This commit is contained in:
2024-10-18 15:41:03 +08:00
parent 034df44373
commit 50f7ce4799

View File

@@ -190,16 +190,18 @@ public class TbCallServiceImpl implements TbCallService {
throw new MsgException("此号码已被其他用户订阅"); throw new MsgException("此号码已被其他用户订阅");
} }
Integer count = callQueueService.lambdaQuery() if (!subMsgDTO.getOpenId().equals(queue.getOpenId()) && queue.getSubState() == 0) {
Integer count = callQueueService.lambdaQuery()
// .eq(TbCallQueue::getPhone, takeNumberDTO.getPhone()) // .eq(TbCallQueue::getPhone, takeNumberDTO.getPhone())
.eq(TbCallQueue::getOpenId, subMsgDTO.getOpenId()) .eq(TbCallQueue::getOpenId, subMsgDTO.getOpenId())
.eq(TbCallQueue::getShopId, subMsgDTO.getShopId()) .eq(TbCallQueue::getShopId, subMsgDTO.getShopId())
.eq(TbCallQueue::getCreateDay, DateUtil.date().toString("yyyy-MM-dd")) .eq(TbCallQueue::getCreateDay, DateUtil.date().toString("yyyy-MM-dd"))
.in(TbCallQueue::getState, 0, 1) .in(TbCallQueue::getState, 0, 1)
.ne(TbCallQueue::getIsPostpone, 2) .ne(TbCallQueue::getIsPostpone, 2)
.eq(TbCallQueue::getCallTableId, queue.getCallTableId()).count(); .eq(TbCallQueue::getCallTableId, queue.getCallTableId()).count();
if (count > 0) { if (count > 0) {
throw new MsgException("您已订阅其他号码,请勿重复订阅"); throw new MsgException("您已订阅其他号码,请勿重复订阅");
}
} }
queue.setSubState(1); queue.setSubState(1);