Commit 62f1546e authored by suhuiguang's avatar suhuiguang

1.事务问题 提交后再发送 否则前端刷新不出来

parent 38f3e579
......@@ -234,11 +234,11 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
// syncDataService.syncCreatedSendAlarmReport(ent);
}
//数字换流站使用
mqttSendGateway.sendToMqtt(TopicEnum.EQZXDT.getTopic(), "");
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override
public void afterCommit() {
//数字换流站使用
mqttSendGateway.sendToMqtt(TopicEnum.EQZXDT.getTopic(), "");
JSONObject jsonObject = new JSONObject();
jsonObject.put("seqNo", UUID.randomUUID().toString().replace("-", "").toLowerCase());
mqttSendGateway.sendToMqtt(TopicEnum.ALARM_LOG_INSERT.getTopic(), jsonObject.toString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment