| | |
| | | package com.ard.alarm.apponekey.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.ard.utils.mqtt.MqttConsumer; |
| | | import com.ard.utils.uuid.IdUtils; |
| | | import com.ard.utils.mqtt.MqttProducer; |
| | | import com.ard.utils.util.IdUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ard.alarm.apponekey.domain.ArdAlarmApponekey; |
| | |
| | | ardAlarmApponekey.setId(IdUtils.fastSimpleUUID()); |
| | | ardAlarmApponekey.setCreateTime(new Date()); |
| | | printLog(ardAlarmApponekey); |
| | | MqttConsumer.publish(2, false, "apponekey", JSON.toJSONString(ardAlarmApponekey)); |
| | | MqttProducer.publish(2, false, "apponekey", JSON.toJSONString(ardAlarmApponekey)); |
| | | return 1; |
| | | } catch (Exception ex) { |
| | | log.error("一键报警处理异常:" + ex.getMessage()); |