From 117acc2b09aaf0a6964aeadac201aaa3f35681b7 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 15 Nov 2023 17:09:56 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=91=8A=E8=AD=A6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/alarm/handle/service/impl/MessageServiceImpl.java | 7 +++---- .../java/com/hnac/hzims/alarm/monitor/listener/AlarmListener.java | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) 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;