This commit is contained in:
zhn
2022-06-08 14:29:50 +08:00
parent e47853daef
commit 40addf6193
@@ -3044,6 +3044,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
}
//订阅标准
List<String> userIdListUpdate = new ArrayList<>();
List<String> userIdListUpdateFeishu = new ArrayList<>();
String id = (String) map.get("id");
if (StringUtils.isNotBlank(id)) {
QueryWrapper<OnlCgformSubscribe> querySubscribe = new QueryWrapper<>();
@@ -3057,6 +3058,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
List<SysUser> sysUsers = this.sysUserMapper.selectList(userQuery);
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(sysUsers)) {
userIdListUpdate = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
userIdListUpdateFeishu = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
}
}
}
@@ -3091,6 +3093,16 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
sendWebsocket((String) map.get("id"), contentInfo);
}
//订阅文档的飞书消息
try {
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
category + " " + serialNumber+" has been updated.";
//跳转文档详情
String url = backUrl + "/docManage/library/detail?id=" + id;
iFeishuService.batchSendMessage(userIdListUpdateFeishu.toArray(new String[]{}), contentInfoFei, MessageTypeEnum.READ.getName(), url);
} catch (IOException e) {
log.error("文档新增飞书消息推送失败");
}
}
// }
//2. 处理修改代替标准的发送消息(法规负责人)