diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/handle/service/impl/MessageServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/handle/service/impl/MessageServiceImpl.java index fd80cc9..8200dd8 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/handle/service/impl/MessageServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/handle/service/impl/MessageServiceImpl.java @@ -53,14 +53,14 @@ public class MessageServiceImpl implements MessageService { boolean support = alarmConfigService.isSupport(entity.getStationId(), entity.getAlarmSource(), entity.getAlarmType(), AlarmConstants.IS_PLATFORM_MESSAGE); R stationByCode = stationClient.getStationByCode(entity.getStationId()); if (!stationByCode.isSuccess() && ObjectUtils.isEmpty(stationByCode.getData())) { - log.error("消息发送失败:站点code获取失败",entity); + log.error("消息发送失败:站点code获取失败 : {}",entity); return; } Long dept = stationByCode.getData().getCreateDept(); // 获取站点用户 R> result = userClient.userListByDeptId(dept); if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) { - log.error("消息发送失败:用户获取失败",entity); + log.error("消息发送失败:用户获取失败 : {}",entity); return; } if (support) { @@ -68,8 +68,7 @@ public class MessageServiceImpl implements MessageService { message.setBusinessClassify("warning"); message.setBusinessKey(MessageConstants.BusinessClassifyEnum.WARNING.getKey()); message.setSubject(MessageConstants.BusinessClassifyEnum.WARNING.getDescription()); -// todo -// message.setTaskId(entity.getAlarmId()); + message.setTaskId(Long.valueOf(entity.getAlarmId())); message.setTenantId("200000"); message.setContent(entity.getAlarmContext()); message.setDeptId(dept); diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/listener/AlarmListener.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/listener/AlarmListener.java index 8741a71..ce4f618 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/listener/AlarmListener.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/monitor/listener/AlarmListener.java @@ -3,7 +3,6 @@ package com.hnac.hzims.alarm.monitor.listener; import com.alibaba.fastjson.JSONObject; import com.hnac.hzims.alarm.entity.AlarmEntity; import com.hnac.hzims.alarm.handle.service.MessageService; -import com.hnac.hzims.message.fegin.IMessageClient; import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.utils.StringUtil; import org.springblade.queue.annotation.RedisQueue;