From 18de968416bb01f7398bdf2c3e12fdd002dcf5d1 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Thu, 18 Apr 2024 15:32:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E7=9F=AD=E4=BF=A1=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E6=8C=87=E5=AE=9A=E7=94=A8=E6=88=B7=EF=BC=8C=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=85=AC=E4=BC=97=E5=8F=B7=E6=8E=A8=E9=80=81=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/alarm/source/service/impl/MessageServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java index c8007f0..e0ae381 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java @@ -108,7 +108,7 @@ public class MessageServiceImpl implements MessageService { // } //写死传给固定用户 // List phoneList=Arrays.asList("18351807087","18163793336","13725599914"); - List phoneList=Arrays.asList("18351807087","18163793336"); + List phoneList=Arrays.asList("18351807087","18163793336","18285121497"); for (String phone : phoneList) { R userByPhone = userClient.getUserByPhone("200000", phone); if (userByPhone.isSuccess()&&ObjectUtils.isNotEmpty(userByPhone.getData())){ @@ -157,9 +157,9 @@ public class MessageServiceImpl implements MessageService { } WxMessageDTO message = new WxMessageDTO(); // 模板Id - message.setTemplateId("Ce2YAZtX0UyoNrAag6CANtC8XQeLuil7domvJrUivhM"); - // 微信消息跳转地址 - message.setSkipUrl("http://baidu.com"); + message.setTemplateId("hIgINCsjpG-gyCKh8wzwBeRL9tanTLqRDgv-X8B9vyc"); +// // 微信消息跳转地址 +// message.setSkipUrl("http://baidu.com"); // 机构Id message.setDeptId(result.getData().get(0).getId()); // 业务关键字 @@ -171,10 +171,10 @@ public class MessageServiceImpl implements MessageService { // 微信参数键值对 HashMap map = new HashMap<>(); map.put("thing18",entity.getStationName()); - map.put("thing5",Optional.ofNullable(entity.getDeviceCode()).orElse("未知设备")); +// map.put("thing5",Optional.ofNullable(entity.getDeviceCode()).orElse("未知设备")); map.put("thing11",entity.getAlarmContext()); - map.put("thing14", DictCache.getValue("alarm_source", entity.getAlarmSource())); map.put("time2",entity.getAlarmTime()); + map.put("thing14", DictCache.getValue("alarm_source", entity.getAlarmSource())); message.setMap(map); // 消息内容 message.setContent(entity.getAlarmContext());