Przeglądaj źródła

2023-3-7 下发一体机消息优化代码

chaiyunlong 2 lat temu
rodzic
commit
9687362263

+ 0 - 17
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mqtt/service/impl/SubMessageSendManager.java

@@ -124,23 +124,6 @@ public class SubMessageSendManager {
         MessageBody messageBody = getMessageBody(subFunction);
         logger.error("消息推送一体机开始");
         //仅发送一次
-//        commonSend.send(getFunctionSubTopic(subId), messageBody, SendMode.ONCE);
-        int count = 0;
-
-//        List<SensorFunctionStatus> sensorFunctionStatusList = subFunction.getFunctionStatuses();
-//        for (SensorFunctionStatus sensorFunc : sensorFunctionStatusList) {
-//            if (redisService.getCacheObject(sensorFunc.getFunNum()+""+sensorFunc.getDescribe())==null){
-//                logger.error("消息推送funNum存入redis:::"+sensorFunc.getFunNum()+""+sensorFunc.getDescribe());
-//                redisService.setCacheObject(sensorFunc.getFunNum()+""+sensorFunc.getDescribe(),sensorFunc.getFunNum(),15L, TimeUnit.SECONDS);
-//                count++;
-//            }
-//        }
-//        if(count>0){
-//            logger.error("消息推送中.......");
-//            commonSend.send(getFunctionSubTopic(subId), messageBody, SendMode.ONCE);
-//        }
-
-
         if (redisService.getCacheObject("onePcSub"+subId)==null){
             logger.error("消息推送中.......");
             redisService.setCacheObject("onePcSub"+subId,subId,15L, TimeUnit.SECONDS);