|
@@ -122,17 +122,20 @@ public class SubMessageSendManager {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
MessageBody messageBody = getMessageBody(subFunction);
|
|
MessageBody messageBody = getMessageBody(subFunction);
|
|
|
|
|
+ logger.error("消息推送一体机开始");
|
|
|
//仅发送一次
|
|
//仅发送一次
|
|
|
// commonSend.send(getFunctionSubTopic(subId), messageBody, SendMode.ONCE);
|
|
// commonSend.send(getFunctionSubTopic(subId), messageBody, SendMode.ONCE);
|
|
|
int count = 0;
|
|
int count = 0;
|
|
|
List<SensorFunctionStatus> sensorFunctionStatusList = subFunction.getFunctionStatuses();
|
|
List<SensorFunctionStatus> sensorFunctionStatusList = subFunction.getFunctionStatuses();
|
|
|
for (SensorFunctionStatus sensorFunc : sensorFunctionStatusList) {
|
|
for (SensorFunctionStatus sensorFunc : sensorFunctionStatusList) {
|
|
|
if (redisService.getCacheObject(sensorFunc.getFunNum()+""+sensorFunc.getDescribe())==null){
|
|
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);
|
|
redisService.setCacheObject(sensorFunc.getFunNum()+""+sensorFunc.getDescribe(),sensorFunc.getFunNum(),15L, TimeUnit.SECONDS);
|
|
|
count++;
|
|
count++;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if(count>0){
|
|
if(count>0){
|
|
|
|
|
+ logger.error("消息推送中.......");
|
|
|
commonSend.send(getFunctionSubTopic(subId), messageBody, SendMode.ONCE);
|
|
commonSend.send(getFunctionSubTopic(subId), messageBody, SendMode.ONCE);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|