1.用能代码提交

2.系统并发bug修改
This commit is contained in:
2024-07-29 13:56:28 +08:00
parent da387cc39d
commit 59b56a39dc
6 changed files with 20 additions and 15 deletions

View File

@@ -160,7 +160,7 @@ public class StatisticDataRunController {
}
}
} else {
log.error(start + "——————" + end + "数据为空");
log.error(start + "——————" + end + "influxdb数据库power_data表数据为空,请联系管理员排查");
}

View File

@@ -530,7 +530,7 @@ public class EleAirStrategyServiceImpl extends ServiceImpl<AirStrategyMapper, Ai
this.mqttSendCount = 0;
this.mqttJsonMsg = json;
this.mqttSendTopic = topic;
Thread.sleep(3000);
}
} else {
@@ -555,8 +555,11 @@ public class EleAirStrategyServiceImpl extends ServiceImpl<AirStrategyMapper, Ai
this.mqttSendCount = 0;
this.mqttJsonMsg = json;
this.mqttSendTopic = topic;
Thread.sleep(3000);
System.out.println("发送关空调控制"+LocalDateTime.now());
}
Thread.sleep(8000);
}
if ("close".equals(operation) && airStrategy.getType() == 0) {
@@ -583,6 +586,7 @@ public class EleAirStrategyServiceImpl extends ServiceImpl<AirStrategyMapper, Ai
@MqttSubscribe(value = "/platform/devack/#", qos = 1)
public void airOperation(String topic, MqttMessage message, @Payload String payload) {
System.out.println("收到网关反馈控制"+LocalDateTime.now());
System.out.println(message.toString());
JSONObject jsonObject = new JSONObject(message.toString());
String str = jsonObject.getStr("userId");
@@ -594,6 +598,7 @@ public class EleAirStrategyServiceImpl extends ServiceImpl<AirStrategyMapper, Ai
System.out.println("进入错误重发++++++");
System.out.println("错误重发详情" + mqttJsonMsg);
publisher.send(mqttSendTopic, mqttJsonMsg, 1, false);
}
}
}