|
|
@@ -162,6 +162,13 @@ public class WebsocketNoticeLogServiceImpl extends ServiceImpl<WebsocketNoticeLo
|
|
|
}
|
|
|
List<WebSocketSendVo> list = new ArrayList<>();
|
|
|
for (Long userId : userSet) {
|
|
|
+ //获取用户信息
|
|
|
+ SysUser sysUser = coreNoticeRuleItemService.getByUserId(userId);
|
|
|
+ if (sysUser == null){
|
|
|
+ LogUtils.SMS_NOTICE_LOG.info("用户:{},不发送传感器通知和报警短信",userId);
|
|
|
+ sendSmsUserSet.remove(userId);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
WebSocketSendVo sendVo = new WebSocketSendVo();
|
|
|
sendVo.setUserId(userId);
|
|
|
//通知机构
|
|
|
@@ -175,13 +182,6 @@ public class WebsocketNoticeLogServiceImpl extends ServiceImpl<WebsocketNoticeLo
|
|
|
if (!sendSmsUserSet.isEmpty()){
|
|
|
//调用接口发送短信
|
|
|
for (Long userId : sendSmsUserSet) {
|
|
|
- //获取用户信息
|
|
|
- SysUser sysUser = coreNoticeRuleItemService.getByUserId(userId);
|
|
|
- if (sysUser == null){
|
|
|
- LogUtils.SMS_NOTICE_LOG.info("用户:{},不发送传感器报警短信",userId);
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
LocalDateTime localDateTime = iotAlarmData.getTime();
|
|
|
String alarmTime = localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
|