From 5f6fd45d151cdd0ff9d6d5f44d0fb055bdc6f997 Mon Sep 17 00:00:00 2001 From: 16639036659 <577530412@qq.com> Date: 星期三, 22 五月 2024 09:16:02 +0800 Subject: [PATCH] 配置文件调整,添加短信报警人 --- src/main/java/com/gkhy/fourierSpecialGasMonitor/service/impl/DataReceiveServiceImpl.java | 8 +++----- src/main/resources/config/application-online-uat.yaml | 4 ++-- src/main/resources/config/application.yaml | 7 +++++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/gkhy/fourierSpecialGasMonitor/service/impl/DataReceiveServiceImpl.java b/src/main/java/com/gkhy/fourierSpecialGasMonitor/service/impl/DataReceiveServiceImpl.java index 4847ac4..4eb1eb3 100644 --- a/src/main/java/com/gkhy/fourierSpecialGasMonitor/service/impl/DataReceiveServiceImpl.java +++ b/src/main/java/com/gkhy/fourierSpecialGasMonitor/service/impl/DataReceiveServiceImpl.java @@ -119,7 +119,7 @@ private static final DateTimeFormatter warnLogFormatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss"); - private static final String[] DEVICE_EXC_RECEIVER = {"17625323889","18019908965"}; + private static final String[] DEVICE_EXC_RECEIVER = {"17625323889","18019908965","18899396560"}; @PostConstruct public void init() { @@ -201,7 +201,7 @@ descs.add(GasFluxStateEnum.INVERSION_FAILED_10_MINUTES_NO_DATA.getDesc()); } String message = JSON.toJSONString(reqDTO); - //todo 暂时改为实时推送给前端 + //暂时改为实时推送给前端 try { GasDeviceExcWebsocketServer.sendInfo(message,null); } catch (IOException e) { @@ -213,8 +213,7 @@ if (lastLog == null || now.compareTo(lastLog.getTime().plusHours(1)) >= 0) { Map<String, String> mesMap = new HashMap<>(); mesMap.put("message","数据异常,无法进行监测"); - mesMap.put(" level","设备离线"); - //// TODO: 2024/2/22 + mesMap.put(" level","设备离线"); // todo List<String> deviceExcReceiver = Arrays.asList(DEVICE_EXC_RECEIVER); if (!CollectionUtils.isEmpty(deviceExcReceiver)) { List<String> distinctPhone = deviceExcReceiver.stream().distinct().collect(Collectors.toList()); @@ -378,7 +377,6 @@ Map<String, String> mesMap = new HashMap<>(); mesMap.put("message",warnTime+" "+gasCategory.getName()); mesMap.put(" level",warnThresholdName); - //todo if (!CollectionUtils.isEmpty(phone)) { List<String> distinctPhone = phone.stream().distinct().collect(Collectors.toList()); logger.info("【气体浓度异常短信发送】-----发送内容:" + content + " 发送时间: " + now + " 接收人手机号:" + distinctPhone); diff --git a/src/main/resources/config/application-online-uat.yaml b/src/main/resources/config/application-online-uat.yaml index 07638b8..c91fd32 100644 --- a/src/main/resources/config/application-online-uat.yaml +++ b/src/main/resources/config/application-online-uat.yaml @@ -6,12 +6,12 @@ datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://127.0.0.1:7006/fourier_specialgas_monitor.uat?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&useAffectedRows=true&useSSL=false + url: jdbc:mysql://127.0.0.1:7006/fourier_specialgas_monitor.uat?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&useAffectedRows=true&allowPublicKeyRetrieval=true username: root password: 2farwL3yPXfbH2AP master: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://127.0.0.1:7006/fourier_specialgas_monitor.uat?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&useAffectedRows=true&useSSL=false + url: jdbc:mysql://127.0.0.1:7006/fourier_specialgas_monitor.uat?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&useAffectedRows=true&allowPublicKeyRetrieval=true username: root password: 2farwL3yPXfbH2AP type: com.alibaba.druid.pool.DruidDataSource diff --git a/src/main/resources/config/application.yaml b/src/main/resources/config/application.yaml index fe2dbb1..93c0939 100644 --- a/src/main/resources/config/application.yaml +++ b/src/main/resources/config/application.yaml @@ -2,5 +2,8 @@ application: name: fourierSpecialGasMonitor profiles: -# active: dev - active: online-uat +# active: dev # +# active: local # 本地 +# active: online-uat-local # 本地连接线上库 + active: online-uat # 线上 +# active: online-uat-1 # 线上 - 已弃用 -- Gitblit v1.9.2