运维管理员添加消息推送

This commit is contained in:
2023-11-03 14:43:43 +08:00
parent cd80501f59
commit e785007f5c

View File

@@ -149,15 +149,17 @@ public class SendEventUtils {
users = appUserFeignClient.getAdminInfo().getData();
noticeUserDto.setPushClientId(Collections.singletonList(users.get(0).getDevCode()));
//记录需要通知的用户和事件关系
CsEventUserPO csEventUser = new CsEventUserPO();
csEventUser.setUserId(users.get(0).getId());
csEventUser.setStatus(0);
csEventUser.setEventId(id);
result.add(csEventUser);
users.forEach(item->{
CsEventUserPO csEventUser = new CsEventUserPO();
csEventUser.setUserId(item.getId());
csEventUser.setStatus(0);
csEventUser.setEventId(id);
result.add(csEventUser);
});
break;
case "2":
case "3":
//Ⅱ、Ⅲ级告警推送相关用户
//Ⅱ、Ⅲ级告警推送相关用户及业务管理员
users = getEventUser(devId);
devCodeList = users.stream().map(User::getDevCode).collect(Collectors.toList());
noticeUserDto.setPushClientId(devCodeList);
@@ -263,6 +265,8 @@ public class SendEventUtils {
if (CollectionUtil.isNotEmpty(list)){
users = userFeignClient.getUserByIdList(result).getData();
}
List<User> adminUser = appUserFeignClient.getAdminInfo().getData();
users.addAll(adminUser);
return users;
}