liusheng
2024-06-06 ef81a5cbfbb98974ed1ba54d0e47b7e74a9b96b9
smartor/src/main/java/com/smartor/service/impl/IvrTaskServiceImpl.java
@@ -208,18 +208,18 @@
        if (org.apache.commons.lang3.StringUtils.isEmpty(sendTaskVO.getSendType())) {
            sendTaskVO.setSendType(ivrTask.getSendType().toString());
        }
        Long ss = ivrTask.getStopState() + 1;
        //判断任务是否是立即发送
        if (org.apache.commons.lang3.StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("2")) {
            IvrTaskcallMQ ivrTaskcallMQ = new IvrTaskcallMQ();
            ivrTaskcallMQ.setTaskid(sendTaskVO.getTaskId());
            ivrTaskcallMQ.setSendType(sendTaskVO.getSendType());
            ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
            ivrTaskcallMQ.setStopState(ss);
            ivrTaskcallMQ.setPreachform(ivrTask.getPreachform());
            ivrTaskcallMQ.setStopState(ivrTask.getStopState());
            String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
            ivrTaskcallMQJson = ivrTaskcallMQJson.substring(1, ivrTaskcallMQJson.length() - 1);
            //立即发送
            rabbitMqCallPhoneConfig.sendMessage("phone_exchange", "phone.123", ivrTaskcallMQJson, 0L);
@@ -227,7 +227,6 @@
            IvrTask ivrTask2 = new IvrTask();
            ivrTask2.setTaskid(ivrTask.getTaskid());
            ivrTask2.setSendState(2);
            ivrTask2.setStopState(ss);
            updateIvrTask(ivrTask2);
        } else if (org.apache.commons.lang3.StringUtils.isNotEmpty(sendTaskVO.getSendType()) && sendTaskVO.getSendType().equals("1")) {
            //时间段发送
@@ -263,6 +262,7 @@
                    ivrTaskcallMQ.setTemplateid(ivrTask.getTemplateid().toString());
                    ivrTaskcallMQ.setSendTimeslot(list);
                    ivrTaskcallMQ.setStopState(ivrTask.getStopState());
                    ivrTaskcallMQ.setPreachform(ivrTask.getPreachform());
                    Long finalMilliseconds = milliseconds;
                    String ivrTaskcallMQJson = JSON.toJSONString(ivrTaskcallMQ);
@@ -273,7 +273,6 @@
                IvrTask ivrTask2 = new IvrTask();
                ivrTask2.setTaskid(ivrTask.getTaskid());
                ivrTask2.setSendState(2);
                ivrTask2.setStopState(ss);
                updateIvrTask(ivrTask2);
            }
        }